diff --git a/example/package.json b/example/package.json index f675bf6..0e4b330 100644 --- a/example/package.json +++ b/example/package.json @@ -2,6 +2,9 @@ "name": "example", "version": "1.0.0", "dependencies": {}, + "scripts": { + "doc": "typedoc --includes src" + }, "devDependencies": { "typedoc": "^0.22.13" } diff --git a/example/src/foo.md b/example/src/foo.md new file mode 100644 index 0000000..d784cd6 --- /dev/null +++ b/example/src/foo.md @@ -0,0 +1,6 @@ +# Foo + +```mermaid +graph TB + A --> B +``` diff --git a/example/src/foo.ts b/example/src/foo.ts new file mode 100644 index 0000000..db78cc6 --- /dev/null +++ b/example/src/foo.ts @@ -0,0 +1,4 @@ +/** + * [[include:foo.md]] + */ +export class Foo {} diff --git a/example/src/index.ts b/example/src/index.ts index 6a3cdf2..90b6e89 100644 --- a/example/src/index.ts +++ b/example/src/index.ts @@ -1,3 +1,5 @@ +export { Foo } from './foo'; + /** * Example * diff --git a/package.json b/package.json index a629d50..f4e9a18 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "lint": "eslint -c .eslintrc.json --ext ts src && prettier --check './**/*.ts'", "build": "rollup -c && prettier --write ./dist/*", "test": "jest", - "example": "cd example && yarn typedoc" + "example": "yarn --cwd example" }, "dependencies": { "html-escaper": "^3.0.0"