1.1.2-beta • Published 3 years ago
@mr-moto/react-snippet-generator v1.1.2-beta
React Snippet Generator (RSG)
RSG is a CLI tool that generates boilerplate react components.
Install
npm i -D @mr-moto/react-snippet-generator
yarn -D @mr-moto/react-snippet-generator
pnpm i -D @mr-moto/react-snippet-generatorConfig
Include a .rsgrc ( or another cosmiconfig format file ) at the root of your project directory.
You can set a custom path for the generated components in this file
{
components: {
path: 'src/custom_path_here'
},
pages: {
path: 'src/custom_path_here'
}
}Usage
npx rsg [command] <name>Examples
npx rsg component button
npx rsg page AboutUs
npx rsg c input -tCommands
component (c)
creates a react component in the src/components directory
npx rsg component <name> [options]
npx rsg c <name> [options]arguments
| argument | required | description |
|---|---|---|
<name> | yes | name of the component. RSG will automatically capitalize the first letter |
options
| option | alias | required | description |
|---|---|---|---|
--ts | -t | no | generates a react ts component |
page (p)
creates a react component in the src/page directory
npx rsg page <name> [options]
npx rsg p <name> [options]arguments
| argument | required | description |
|---|---|---|
<name> | yes | name of the component. RSG will automatically capitalize the first letter |
options
| option | alias | required | description |
|---|---|---|---|
--ts | -t | no | generates a react ts component |
1.1.1-beta
3 years ago
1.1.2-beta
3 years ago
1.1.0-beta
3 years ago
1.0.5-beta
3 years ago
1.0.4-beta
3 years ago
1.0.2-beta
3 years ago
1.0.1-beta
3 years ago
1.0.0-beta
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago