Documentation Generation
docs-readme: マークダウンでフォーマットされたドキュメントのreadmeファイルdocs-json: JSONでフォーマットされたドキュメントデータdocs-custom: カスタムドキュメントの生成docs-vscode: Documentation generation for VS Codestats: Stats about the compiled files
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は、cssまたはscssファイル内のjsdocスタイルのコメントを介してCSS変数を指定すると、CSS変数も文書化します。
:root {
/**
* @prop --primary: プライ マリヘッダーの色
*/
--primary: blue;
}