You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can generate the following components using generate-plop
19
+
20
+
- React Components: Class and Functional in [Atomic Design](https://atomicdesign.bradfrost.com/) structure.
21
+
- React Custom Hooks.
22
+
- React Context.
23
+
- React Query Services.
24
+
- Next.js Pages/Routes.
25
+
26
+
You can use this generator in a single app repo as well as in a monorepo
27
+
(powered by [turborepo](https://turborepo.org/)).
28
+
generate-plop is intelligent enough to figure out if it being run in single app repo
29
+
or in the root directory of monorepo.
30
+
31
+
If it is a monorepo, you will be asked to choose the from the application in ```` /apps````
32
+
annd ```` /packages```` directories where you wish to create the component.
33
+
34
+
After the app selection workflow of monorepo is same as the workflow in single repo application.
35
+
The workflow is explaied below.
36
+
37
+
### Components
38
+
As of now, the Current version creates react-components only. You can create [Functional
39
+
or Class components](https://reactjs.org/docs/components-and-props.html).
40
+
- You can create atoms or molecules or organisms or templates.
41
+
- Any of the above categories you choose, tool expects directory ````/src/{category}````
42
+
to be available.
43
+
- You can create react component at the custom path as well. You will need to enter
44
+
a custom path relative to ````/src```` directory.
45
+
In the last step, you will need to provide the name of the componentt.
46
+
47
+
Based on all details provided generate-tool will create follwoing files:
48
+
-````index.ts```` Export statement for the component.
49
+
-````{name}.ts````React component
50
+
-````tests/{name}.test.ts```` Unit test basic structure for the component using [React Test Library](https://testing-library.com/docs/react-testing-library/intro/)
51
+
-````{name}.style.ts```` Style file for the component using [Styled Component framework](https://styled-components.com/)
52
+
-````{name}.story.ts````[Storybook](https://storybook.js.org/) created for the component.
0 commit comments