🚀 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.7.3

2

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

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

@@ -17,2 +17,20 @@ # Generate React CLI

## Usage
### Generate Component
`generate-react component <ComponentName>`
#### Shorthand
`g-r c <ComponentName>`
This command will create a folder with your component name within your default (e.g. **src/components**) directory, and its corresponding files.
#### Options
|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**
| **-t** or<br>**--withTest** | Create a corresponding test file with this component? | **Boolean value selected in "generate-react-cli.json" config file**
| **-s** or<br>**--withStory** | Create a corresponding story file with this component? | **Boolean value selected in "generate-react-cli.json" config file**
| **-l** or<br>**--withLazy** | Create a corresponding lazy file (a file that lazy-loads your component out of the box and enables [code splitting](https://reactjs.org/docs/code-splitting.html#code-splitting)) with this component? | **Boolean value selected in "generate-react-cli.json" config file**
## Config File

@@ -39,22 +57,3 @@ When you run generate-react-cli within your project the first time, it will ask you a series of questions to customize the cli for your project needs (this will create a "generate-react-cli.json" config file).

```
## Commands
### Generate Component
`generate-react component <ComponentName>`
#### Shorthand
`g-r c <ComponentName>`
This command will create a folder with your component name within your default (e.g. **src/components**) directory, and its corresponding files.
#### Options
|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**
| **-t** or<br>**--withTest** | Create a corresponding test file with this component? | **Boolean value selected in "generate-react-cli.json" config file**
| **-s** or<br>**--withStory** | Create a corresponding story file with this component? | **Boolean value selected in "generate-react-cli.json" config file**
| **-l** or<br>**--withLazy** | Create a corresponding lazy file (a file that lazy-loads your component out of the box and enables [code splitting](https://reactjs.org/docs/code-splitting.html#code-splitting)) with this component? | **Boolean value selected in "generate-react-cli.json" config file**
<br>
Have fun!