Doist / reactist

Open source React components made with ❤️ by Doist
http://doist.github.io/reactist
MIT License
248 stars 22 forks source link

chore: Introduce new component template #746

Closed gnapse closed 1 year ago

gnapse commented 1 year ago

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

  1. Run npm install
  2. Run npm run plop component[^1]
  3. Provide a name for your component (e.g. dropdown select, NavListItem or sortable-table)
  4. 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:

Versioning

No need to release. It's an internal change for devs only, that does not change what the library provides to its consumers.