react-clc
v1.0.4
Published
A simple commands for generating React Components
Downloads
5
Readme
A simple commands for generating React Components
Installation
npm install -g react-clc
yarn global add react-clc
Setup configuration file for project
rc init
P.S. run rc --help
for more information about options
Examples
$ component | c
This one creates Home component in source directory, with its style
rc component home
This one creates Home directory, also component and style files within
rc c home/home
$ native | m
native command creates React Native component with or without style
This one creates Home component in source directory, with its style
rc native home
You can use -dc option with native and component commands for creating components in own directories!
Example
rc native home -dc
component-config.json file
{
"style": "css",
"component": "function",
"fileExtension": "jsx",
"sourceDir": "src",
"directoryComponent": "no",
"nativeStyle": "file"
}
Configuration
- "css"
- "scss"
- "less"
- "sass"
- "none" (for no style file)
- "function"
- "class"
- "js"
- "jsx"
- "tsx"
- src
- src/components
Types
- "yes"
- "no"
Types
- "file"
- "in" (styles at the end of the component file)
- "none"