Skip to content

Commit

Permalink
add markdown include example
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiazya committed Mar 31, 2022
1 parent 019fcc5 commit 298991b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "example",
"version": "1.0.0",
"dependencies": {},
"scripts": {
"doc": "typedoc --includes src"
},
"devDependencies": {
"typedoc": "^0.22.13"
}
Expand Down
6 changes: 6 additions & 0 deletions example/src/foo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Foo

```mermaid
graph TB
A --> B
```
4 changes: 4 additions & 0 deletions example/src/foo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* [[include:foo.md]]
*/
export class Foo {}
2 changes: 2 additions & 0 deletions example/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export { Foo } from './foo';

/**
* Example
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 298991b

Please sign in to comment.