crcf-skeleton

0.0.2 • Public • Published

Create React Component folder

NPM version NPM downloads

About

This package is built on top of create-react-component-folder.
It provides smoke tests along with normal test based on a flag.
Create React Component folder works on macOS, Windows, and Linux.
It creates React or React Native component folder structure with one command.
There is also support for Typescript, React Native, Less and Sass.

Quick Overview

$ npm install --save-dev create-react-component-folder
$ npx crcf myComponent

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

npx crcf myComponent

Tutorial

Read the artice on Medium

Installation

$ npm install --save-dev create-react-component-folder

Creating single component

$ npx crcf myComponent
$ npx crcf components/myComponent

Output single

Creating multiple components

$ npx crcf components/header footer button navigation

Output multiple

Component folder structure

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

Creating index.js file for multple component imports

$ npx crcf --createindex

Output in index.js file for multple component imports

Options

$ npx crcf --help
 
  Usage: index [options]
 
  Options:
 
    -V, --version     output the version number
    --typescript      Creates Typescript component and files
    --nocss           No css file
    --notest          No test file
    --reactnative     Creates React Native components
    --createindex     Creates index.js file for multple component imports
    -f, --functional  Creates React stateless functional component
    -j, --jsx         Creates the component file with .jsx extension
    -l, --less        Adds .less file to component
    -s, --scss        Adds .scss file to component
    -p, --proptypes   Adds prop-types to component
    -u, --uppercase   Component files start on uppercase letter
    -s, --smoke       Add smoke testing to your components
    -h, --help        output usage information

Author

License

MIT

Package Sidebar

Install

npm i crcf-skeleton

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

1.23 MB

Total Files

65

Last publish

Collaborators

  • n_n