1.0.4 • Published 3 years ago
react-clc v1.0.4
A simple commands for generating React Components
Installation
npm install -g react-clcyarn global add react-clcSetup configuration file for project
rc initP.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 homeThis 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 homeYou can use -dc option with native and component commands for creating components in own directories!
Example
rc native home -dccomponent-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/componentsTypes
- "yes"
- "no"Types
- "file"
- "in" (styles at the end of the component file)
- "none"