1.0.1 • Published 2 years ago

tiny-react-cli v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

GitHub Workflow Status (branch) npm bundle size npm GitHub last commit GitHub

What is the purpose?

It's a very tiny cli (command line interface) tool for creating react component.

Usage

Install package

# NPM
npm install tiny-react-cli

# Yarn
yarn add tiny-react-cli

Create with default settings

Command

react-cli g ComponentName

Result

Welcome to tiny react cli
CREATED: src/components/ComponentName/index.js
CREATED: src/components/ComponentName/ComponentName.js

Options

add test file to output with "-t" parameter

Command

react-cli g ComponentName -t

Result

Welcome to tiny react cli
CREATED: src/components/ComponentName/index.js
CREATED: src/components/ComponentName/ComponentName.js
CREATED: src/components/ComponentName/ComponentName.test.js

use custom path with "-p" parameter

Command

react-cli g ComponentName -t -p src/pages

Result

Welcome to tiny react cli
CREATED: src/pages/ComponentName/index.js
CREATED: src/pages/ComponentName/ComponentName.js
CREATED: src/pages/ComponentName/ComponentName.test.js

Licence

MIT