Skip to content

A command-line interface for react component creation

License

Notifications You must be signed in to change notification settings

ivanfuzuli/tiny-react-cli

Repository files navigation

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

About

A command-line interface for react component creation

Resources

License

Stars

Watchers

Forks

Packages

No packages published