Introduces a new tool called plop, leveraged in this PR to provide an easy way to create bare-bones source files to implement a new component. The generated source files include the component implementation with sample props and styles, plus a small test file and storybook source files as well.
Provide a name for your component (e.g. dropdown select, NavListItem or sortable-table)
Leave the other two prompts at their default value by pressing "Enter" twice
[^1]: Alternatively, you can npm install -g plop and then you can use the command plop component directly.
Now check the following:
[x] A new folder was created with all the new source files in it (e.g. check by running git status). Check the new source files if you're curious.
[x] Run npm run test:watch to see the new minimal component test in action. The test should pass.
[x] Run npm run storybook and check the stories for the new component. Stories should work and allow you to change the props and see the visual effects (in the "Playground" story for your new component).
Versioning
No need to release. It's an internal change for devs only, that does not change what the library provides to its consumers.
Short description
Introduces a new tool called plop, leveraged in this PR to provide an easy way to create bare-bones source files to implement a new component. The generated source files include the component implementation with sample props and styles, plus a small test file and storybook source files as well.
Demo
https://user-images.githubusercontent.com/15199/213154676-7926118f-f772-420f-baf8-cdae93efda1d.mp4
Test plan
npm install
npm run plop component
[^1]dropdown select
,NavListItem
orsortable-table
)[^1]: Alternatively, you can
npm install -g plop
and then you can use the commandplop component
directly.Now check the following:
git status
). Check the new source files if you're curious.npm run test:watch
to see the new minimal component test in action. The test should pass.npm run storybook
and check the stories for the new component. Stories should work and allow you to change the props and see the visual effects (in the "Playground" story for your new component).Versioning
No need to release. It's an internal change for devs only, that does not change what the library provides to its consumers.