Skip to content

transform

Fans component spec files out into derived artifacts — contracts, styles, React components, and Storybook stories.

Usage

Terminal window
specs transform [transformers...] [options]

Arguments

[transformers...]

One or more transformer names to run. When omitted, uses config.transform.transformers from your config file, then falls back to the CLI default (contract).

Terminal window
specs transform contract css react stories

Options

-o, --output <path>

Override the output directory for generated artifacts.

--config <path>

Use a specific config file.

--components <keys...>

Only transform the named component folders instead of every component discovered in the output directory. Unknown component keys log a warning and are skipped.

Terminal window
specs transform react stories --components dsAlert dsBadge

--verbose

Show detailed output during transformation.

Transformers

NameOutput
contract (default)TypeScript Props interface and defaults, plus Slots/SlotRules per component
cssCSS custom property rules per component
reactA working React component scaffold, seeded once into an authored file
storiesA Storybook CSF page per component

See Also