[フレーム]
Skip to main content
An OutSystems Company →
This is documentation for Stencil v4.35, which is no longer actively maintained.
For up-to-date documentation, see the latest version (v4.40).
Version: v4.35

Documentation Generation

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).

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 ="";

CSS Example:

Stencil will also document CSS variables when you specify them via jsdoc-style comments inside your css or scss files:

:root{
/**
* @prop --primary: Primary header color.
*/
--primary: blue;
}

AltStyle によって変換されたページ (->オリジナル) /