@devmcee/hygen-stories

1.0.10 • Public • Published

hygen-stories

CLI wrapper for hygen to generate storybook stories for the existing components (only React at the moment, .tsx)

It recursivly scans the given folder. If it contains .tsx file and no a .stories.tsx, then it generates one. Name of the file and the name of the components that will be used in the story is taken from the .tsx file name. New name will be in the Pascal Case. Hyphen will be replaced and every part of the name be capitalized:

component-name.tsx => ComponentName.tsx

Example usage:

npx @devmcee/hygen-stories --dir src 
Options:
      --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]
  -d, --dir      directory name, relative path, default is current (./)

TODO:

Use AST analysis of .tsx files to grap the real name of the defined and exported components.

Readme

Keywords

Package Sidebar

Install

npm i @devmcee/hygen-stories

Weekly Downloads

1

Version

1.0.10

License

ISC

Unpacked Size

5.73 kB

Total Files

5

Last publish

Collaborators

  • devmcee