Skip to content

snaerth/create-react-component-folder

 
 

Repository files navigation

About

Creates react component folder structure with one command. We also support Typescript. You can either use crcf or create-react-component-folder Read the artice on Medium

Tutorial

Read the artice on Medium

Install

npm install -g create-react-component-folder

Creating single component

$ crcf myComponent
$ crcf nested/myComponent

Output single

Creating multiple components

$ crcf components/header footer button navigation

Output multiple

Component folder structure

myComponent
├── index.js
├── myComponent.js
├── myComponent.css
├── myComponent.test.js

Options

$ crcf --help

Options
--------------
    -V, --version    output the version number
    --typescript     Creates Typescript component and files
    --reactnative    Creates React Native component and files
    --nocss          No css file
    --notest         No test file
    --createindex    Create index.js file in root of folder with imports of all components in folder       -l, --less       Adds .less file to component
    -s, --sass       Adds .sass file to component
    -p, --proptypes  Adds prop-types to component
    -u, --uppercase  Component files start on uppercase letter
    -h, --help       output usage information

Author

License

MIT

Releases

No releases published

Packages

No packages published

Contributors 19

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy