docs-readme: Documentation readme files formatted in markdown
docs-json: Documentation data formatted in JSON
docs-custom: Custom documentation generation
docs-vscode: Documentation generation for VS Code
stats: Stats about the compiled files
As apps scale with more and more components, and team size and members continue to adjust over time, it's vital all components are well documented, and that the documentation itself is maintained. Maintaining documentation is right up there with some of the least interesting things developers must do, but that doesn't mean it can't be made easier.
Throughout the build process, the compiler is able to extract documentation from each component, to include JSDocs comments, types of each member on the component (thanks TypeScript!) and CSS Variables (CSS Custom Properties).
Component Property Docs Example:
To add a description to a
@Prop, simply add a comment on the previous line:
/** (optional) The icon to display */
@Prop() iconType = "";
Stencil will also document CSS variables when you specify them via jsdoc-style comments inside your css or scss files:
* @prop --primary: Primary header color.