(chore): Update generate:component script to use plop
Update yarn generate:component
to use plop to generate component boilerplate.
Component name should be snake_case
Bootstrap Component name should be e.g. BTable
Template contents still need some work, but nicer to do than manually creating these files.
Example file output:
simon@delaware gitlab-ui % yarn generate:component
yarn run v1.22.0
$ plop
? [PLOP] Please choose a generator. Create Component - Create basic empty component
? Component name in snake_case, e.g. progress_bar:
some_new_component
✔ ++ /src/components/base/some_new_component/examples/some_new_component.basic.example.vue
✔ ++ /src/components/base/some_new_component/examples/index.js
✔ _+ /index.js
✔ _+ /documentation/components_documentation.js
✔ _+ /src/scss/components.scss
✔ ++ /src/components/base/some_new_component/some_new_component.stories.js
✔ ++ /src/components/base/some_new_component/some_new_component.scss
✔ ++ /src/components/base/some_new_component/some_new_component.vue
✔ ++ /src/components/base/some_new_component/some_new_component.md
✔ ++ /src/components/base/some_new_component/some_new_component.documentation.js
✨ Done in 6.32s.
Edited by Simon Knox