🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

generate-react-cli

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-react-cli - npm Package Compare versions

Comparing version

to
1.3.3

2

package.json
{
"name": "generate-react-cli",
"version": "1.3.2",
"version": "1.3.3",
"description": "A simple React CLI to generate components instantly and more.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1,2 +0,2 @@

# generate-react-cli
# Generate React CLI

@@ -9,11 +9,9 @@ ## Why?

Few notes:
- We assume that your project was created using `create-react-app`. Therefore it is using Jest & Enzyme for testing.
**_Few notes:_**
- The CLI assumes that your project uses [jest](https://github.com/facebook/jest) & [enzyme](https://github.com/airbnb/enzyme) for testing. This will be customizable 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.
- The CLI uses CSS Modules by default. This will be customizable in the future.
## Install
Run
>`npm i -g generate-react-cli`

@@ -24,10 +22,11 @@

### Generate Component
Run
>`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, .module.css, .test.js) within it.
This will create a folder with your component name within the **src/components** directory by default, 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**.
|Parameter|Description|Default Value|
|---------|-----------|-------|
| **`-p`** or<br>**`--path`** | Value of the path where you want the component to be generated in (e.g. **`src/pages`**). | **`src/components`**

@@ -38,2 +37,2 @@ ## Coming Soon

<br>
Have fun!
Have fun!