-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Invest 15 minutes in typedocs
- Loading branch information
1 parent
728bad3
commit 3b01e56
Showing
4 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const TypeDoc = require("typedoc"); | ||
|
||
async function main() { | ||
const app = new TypeDoc.Application(); | ||
|
||
// If you want TypeDoc to load tsconfig.json / typedoc.json files | ||
app.options.addReader(new TypeDoc.TSConfigReader()); | ||
app.options.addReader(new TypeDoc.TypeDocReader()); | ||
|
||
app.bootstrap({ | ||
// typedoc options here | ||
entryPoints: ["packages/grid/data-grid/src/index.ts"], | ||
exclude: ['**/*.test.ts'], | ||
tsconfig: 'packages/grid/data-grid/tsconfig.json' | ||
}); | ||
|
||
const project = app.convert(); | ||
|
||
if (project) { | ||
// Project may not have converted correctly | ||
const outputDir = "docsss"; | ||
|
||
// Rendered docs | ||
await app.generateDocs(project, outputDir); | ||
// Alternatively generate JSON output | ||
await app.generateJson(project, outputDir + "/documentation.json"); | ||
} | ||
} | ||
|
||
main().catch(console.error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters