Documentation Generation
docs-readme: マークダウンでフォーマットされたドキュメントのreadmeファイルdocs-json: JSONでフォーマットされたドキュメントデータdocs-custom-elements-manifest: Custom Elements Manifest (CEM) formatdocs-custom: カスタムドキュメントの生成docs-vscode: Documentation generation for VS Codedocs-agent-skill: An Agent Skill for AI coding agentsstats: Stats about the compiled files
Each is generated only when added to outputTargets in your stencil.config.ts.
Docs Auto-Generation
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).
コンポーネントプロパティドキュメントの例:
@Propに説明を追加するには、前の行にコメントを追加するだけです。
/** (optional) The icon to display */
@Prop() iconType = "";
CSSの例
Stencil will also document CSS variables when you add a JSDoc-style comment above their declaration in the component's root rule (:host for shadow or scoped components, the component's tag for the others), in your css or scss files:
:host {
/** Primary header color. */
--primary: blue;
}