Cli tool for creating react components
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
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