Skip to content

Commit

Permalink
Merge pull request #357 from kamiazya/support-typedoc-0-21
Browse files Browse the repository at this point in the history
Supoort typedoc@>=0.21
  • Loading branch information
kamiazya authored Jul 22, 2021
2 parents ae0d8fa + 219814c commit 9a5f212
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 136 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [12.x, 14.x, 16.x]
os: [ubuntu-latest, macos-latest]

steps:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x
registry-url: https://registry.npmjs.org
- name: install global module
run: |
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/typedoc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ jobs:
matrix:
typedoc-version:
- latest
- '~0.17.0'
- '~0.16.0'
- '~0.15.0'
- '~0.14.0'
- '~0.13.0'
- '~0.12.0'
- '~0.11.0'
- '~0.21.0'
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 14.x
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-optional
env:
Expand All @@ -42,7 +36,6 @@ jobs:
echo '{"compilerOptions": {"target": "es5","module": "commonjs","lib": ["es2015"],"strict": true,"esModuleInterop": true,"forceConsistentCasingInFileNames": true}}' >> tsconfig.json
echo 'export class HelloWorld {}' >> src/hello-world.ts
yarn link typedoc-plugin-mermaid
yarn run typedoc --mode file \
--plugin typedoc-plugin-mermaid \
yarn run typedoc --plugin typedoc-plugin-mermaid \
--out docs \
src
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"html-escaper": "^3.0.0"
},
"peerDependencies": {
"typedoc": "^0.11.0"
"typedoc": ">=0.21.0"
},
"devDependencies": {
"@types/html-escaper": "^3.0.0",
Expand All @@ -47,7 +47,7 @@
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.1.0",
"typedoc": "^0.16.9",
"typescript": "^3.7.5"
"typedoc": "^0.21.4",
"typescript": "^4.3.5"
}
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Application } from 'typedoc/dist/lib/application';
import { MermaidPlugin } from './plugin';

module.exports = (PluginHost: Application) => {
export function load(PluginHost: Application): void {
const app = PluginHost.owner;
if (app.converter.hasComponent('mermaid')) {
return;
Expand All @@ -11,4 +11,4 @@ module.exports = (PluginHost: Application) => {
* Add the plugin to the converter instance
*/
app.converter.addComponent('mermaid', new MermaidPlugin(app.converter));
};
}
Loading

0 comments on commit 9a5f212

Please sign in to comment.