4.7.1 • Published 18 days ago
@bryanbuchs/generator-component v4.7.1
generator-component
Generates a component directory for use with Storybook + Twig/Drupal
Requirements
Requires Yeoman
npm install -g yo
Install
npm i -g @bryanbuchs/generator-component
Or, to simplify the yo
command to component
:
npm i -g generator-component@npm:@bryanbuchs/generator-component
Run
Run the generator from the theme directory, files will be scaffolded into components/{component-name}
:
yo component
and follow the prompts.
Output
Running the generator will create a directory with a series of boilerplate files:
components/{component-name}/{component-name}.less
components/{component-name}/{component-name}.library.js
components/{component-name}/{component-name}.stories.js
components/{component-name}/{component-name}.twig
components/{component-name}/{component-name}.behavior.js
(optional)components/{component-name}/{component-name}.yml