generate-react-cli
Advanced tools
Comparing version
{ | ||
"name": "generate-react-cli", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A lightweight CLI that runs create-react-app under the hood to boilerplate react apps and generate react components with a little more structure in mind.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,3 +5,3 @@ # generate-react-cli | ||
To help speed up productivity in react projects. For example you can run one command (`generate-react component <ComponentName>`) to instantly generate a component with its corresponding files (stylesheet, test). | ||
To help speed up productivity in react projects. For example you can run one command `generate-react component <ComponentName>` to instantly generate a component with its corresponding files (stylesheet, test). | ||
@@ -13,2 +13,3 @@ We are starting off with the bare minimum of just generating a component. We plan to add additional commands, options, and configurations in the future. | ||
- The CLI also has an opinion on how files are structured within the project. [We follow Grouping by features or routes](https://reactjs.org/docs/faq-structure.html#grouping-by-features-or-routes) | ||
- We use CSS Modules by default. This will be customizable in the future. | ||
@@ -19,3 +20,3 @@ ## Install | ||
>```npm i -g generate-react-cli``` | ||
>`npm i -g generate-react-cli` | ||
@@ -26,11 +27,10 @@ ## Commands | ||
Run | ||
>```generate-react component <ComponentName>``` | ||
>`generate-react component <ComponentName>` | ||
This will create a folder with your component name within the `src/components` directory, and it will generate 3 corresponding files (.js, .css, test.js) within it. | ||
This will create a folder with your component name within the **src/components** directory, and it will generate 3 corresponding files (.js, .module.css, .test.js) within it. | ||
#### Options | ||
You can also provide a custom path to where you want the component to be generated in: | ||
>```generate-react component <ComponentName> -p src/pages``` => will create a component folder within the `src/pages`. | ||
>`generate-react component <ComponentName> -p src/pages` --> will create a component folder within the **src/pages**. | ||
## Coming Soon | ||
@@ -37,0 +37,0 @@ - CLI custom configuration: e.g. preprocessor stylesheet type, choose different test framework, choose different file structure type, etc.. |
7212
1.01%