0.3.0 • Published 2 years ago
create-npm-react-module v0.3.0
create-npm-react-module 
Easy to use CLI for creating a react environment to develop and publish React component packages.
If something doesn’t work, please file an issue.
Quick Overview
npx create-npm-react-module my-package
cd my-package
npm run start
Thats pretty much it, now you can code your component inside src/index.js
and customize preview environment in preview/index.js
.
Folder Tree
my-package/
├── README.md
├── webpack.config.js
├── .babelrc
├── .gitignore
├── .npmignore
├── package.json
├── node_modules
├── preview/
│ ├── App.js
│ ├── App.module.css
│ ├── index.js
| └── public/
| ├── index.html
| ├── react.svg
| └── favicon.ico
└── src/
├── index.js
└── MyComponent/
├── MyComponent.js
└── MyComponent.module.scss
Commands
- To start preview application in development mode run:
npm run start
- To distribute your component to
dist/
folder in production mode run:
npm run build
Detailed Use
npx create-npm-react-module [project-name] [options]
Options:
--use-yarn
: forces to use yarn for the project.--use-npm
: forces to use npm for the project.
License
Create React Component Package is open source software licensed as MIT.