@storybook/csf
Component Story Format (CSF) utilities
Last updated 3 years ago by shilman .
MIT · Repository · Bugs · Original npm
$ cnpm install @storybook/csf 
SYNC missed versions from official npm registry.

Storybook Component Story Format (CSF)

A minimal set of utility functions for dealing with Storybook Component Story Format (CSF).

Install

yarn add @storybook/csf

API

See package source for function definitions and types:

  • isExportStory(key, { includeStories, excludeStories }) - Does a named export match CSF inclusion/exclusion options?

  • parseKind(kind, { rootSeparator, groupSeparator }) - Parse out the component/kind name from a path, using the given separator config.

  • sanitize(string) - Remove punctuation and illegal characters from a story ID.

  • toId(kind, name) - Generate a storybook ID from a component/kind and story name.

Contributing

If you have any suggestions, please open an issue or a PR.

All contributions are welcome!

run tests:

yarn test

Current Tags

  • 0.1.1--canary.f0d3083.0                                ...           canary (2 years ago)
  • 0.1.1                                ...           latest (2 years ago)
  • 0.1.1-next.0                                ...           next (2 years ago)

10 Versions

  • 0.1.1-next.0                                ...           2 years ago
  • 0.1.1--canary.f0d3083.0                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.0.2--canary.4566f4d.1                                ...           3 years ago
  • 0.0.2--canary.835a408.0                                ...           4 years ago
  • 0.0.2--canary.87bc651.0                                ...           4 years ago
  • 0.0.2--canary.68887a1.0                                ...           4 years ago
  • 0.0.2--canary.6aca495.0                                ...           4 years ago
  • 0.0.2-alpha.0                                ...           6 years ago
  • 0.0.1                                ...           6 years ago

Copyright 2013 - present © cnpmjs.org