-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat: use typedoc to generate a json file documentation dump of all components #1887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
## Example Usage | ||
|
||
### Hiding methods in a class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than hiding the methods with @hidden
, I'd rather just ignore them when we're processing the json for the docs site. The vast majority of methods and properties won't be public, so using @hidden
would add a lot of noise to the source.
## Generating docs for one component | ||
|
||
``` | ||
npm run docs ./src/lib/button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make a gulp task for this.
@@ -0,0 +1,21 @@ | |||
{ | |||
"mode": "modules", | |||
"out": "./docs/autogen", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should output to dist/api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a preference name for the json file? I call it output.json
though api.json
might be more fitting.
"excludeExternals": "true", | ||
"includeDeclarations": "true", | ||
"target": "ES6", | ||
"exclude": "**/+(index.ts|*.spec.ts|*.scss|*.html)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't necessarily want to exclude index.ts
because we do define some constructs there.
(though maybe we shouldn't)
"out": "./docs/autogen", | ||
"json": "./docs/autogen/output.json", | ||
"theme": "default", | ||
"ignoreCompilerErrors": "true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ignoreCompilerErrors
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove it, it was useful for testing individual components which didn't have typings in the same folder (src/lib/button
). However, if I run npm run docs ./src/lib
no errors will be produced since the tsconfig and typings files are found. We should still be able to specify that flag on an individual basis --ignoreCompilerErrors
.
LGTM |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
@jelbourn
I've modifiedbutton.ts
as an example on how to hide underscored methods and to hide its constructor.