react-clc
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

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 not
Types

- "yes"
- "no"
nativeStyle
Types

- "file"
- "in" (styles at the end of the component file)
- "none"

Package Sidebar

Install

npm i react-clc

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

34.9 kB

Total Files

21

Last publish

Collaborators

  • seadann