1.1.2-beta • Published 2 years ago

@mr-moto/react-snippet-generator v1.1.2-beta

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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-generator

Config

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 -t

Commands

component (c)

creates a react component in the src/components directory

npx rsg component <name> [options]
npx rsg c <name> [options]
arguments
argumentrequireddescription
<name>yesname of the component. RSG will automatically capitalize the first letter
options
optionaliasrequireddescription
--ts-tnogenerates 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
argumentrequireddescription
<name>yesname of the component. RSG will automatically capitalize the first letter
options
optionaliasrequireddescription
--ts-tnogenerates a react ts component
1.1.1-beta

2 years ago

1.1.2-beta

2 years ago

1.1.0-beta

2 years ago

1.0.5-beta

2 years ago

1.0.4-beta

2 years ago

1.0.2-beta

2 years ago

1.0.1-beta

2 years ago

1.0.0-beta

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago