An open API service indexing awesome lists of open source software.

https://github.com/syncush/react-boilerplate-cli

Cli tool for creating react components
https://github.com/syncush/react-boilerplate-cli

boilerplate boilerplate-application boilerplate-template cli-utilities frontend frontend-web react reactjs

Last synced: 28 days ago
JSON representation

Cli tool for creating react components

Awesome Lists containing this project

README

          

# react-boilerplate-cli
![version](https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000)

Cli tool for creating react components

# new-component
Creates a new component at the current working directory.

Includes a directory, index.js, css file and component file

Use example:

new-component --class MyComponent

Options:

--class : Class Component (default)

--hooks : Functional Stateful Hooks Component

--func : Functional statless Component

--ts : TypeScript templates (Class Component)

--4spaces : Indent with 4 spaces (default)

--2spaces : Indent with 2 spaces instead of the default 4

--less : less styling extension

--sass : scss styling extension

--story : stories.js file for Storybook

# Installation:

Save the react-boilerplate-cli folder somewhere in your PC (for example C:\)

Make sure Python 3 is installed on your system (run python -V command on your cmd)

Edit the new-component.bat file so the path in the file is the script file path

Copy the new-component.bat to somewhere that your PATH variable knows, or add the folder to your PATH variable (Do a windows search for "environment" and add the path to the PATH variable )

Make sure to close and reopen the cmd, Powershell or VS Code and such so it will know the new script in the PATH

# Contributors