banira stories

Generate Storybook Component Story Format (*.stories.js) from the components — an argTypes controls panel derived from each element’s attributes (string-literal unions become select options) and events (mapped to actions), with zero hand-written story code.

Usage

$ banira stories <files...> [options]

Arguments

ArgumentDescription
<files...>Component source files to analyze.

Options

OptionDescription
-o, --out-dir <dir>Directory to write the stories to. (default: .)
--import-path <path>Module imported per story so the element registers (default ./{tag}.js).

Examples

write one story per element
$ banira stories src/*.ts -o stories

Notes

Pair with @storybook/web-components; in .storybook/preview.js, call setCustomElementsManifest(manifest) (from a banira manifest-generated custom-elements.json) for richer auto-docs.