npm install -g react-clc
yarn global add react-clc
rc init
P.S. run rc --help
for more information about options
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 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!
rc native home -dc
{
"style": "css",
"component": "function",
"fileExtension": "jsx",
"sourceDir": "src",
"directoryComponent": "no",
"nativeStyle": "file"
}
style
Types- "css"
- "scss"
- "less"
- "sass"
- "none" (for no style file)
component
Types- "function"
- "class"
fileExtension
Types- "js"
- "jsx"
- "tsx"
sourceDir
Directory Path (string)- src
- src/components
directoryComponent
Wheter the components must have their own directories or notTypes
- "yes"
- "no"
nativeStyle
Types
- "file"
- "in" (styles at the end of the component file)
- "none"