🛠️ All-in-one CLI for building React Library
MIT License
All-in-one CLI for building React Library
You can check react-lib-starter for the usage.
Tech stacks used:
$ npm install -D react-lib-scripts
You can put the command as npm scripts.
"start": "react-lib-scripts start",
"build": "react-lib-scripts build"
Note:
- Node 8+ supported
- `NODE_ENV` environment variable is required.
Set following fields on your package.json
"main": "lib/index.js",
"files": [
"lib",
...
],
react-lib-scripts build
Create library bundle
USAGE
$ react-lib-scripts build
DESCRIPTION
...
Create library bundle
See code: src/commands/build.js
react-lib-scripts help [COMMAND]
display help for react-lib-scripts
USAGE
$ react-lib-scripts help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
react-lib-scripts start
Start lib development flow
USAGE
$ react-lib-scripts start
DESCRIPTION
...
Extra documentation goes here
See code: src/commands/start.js
.babelrc
in the root of your packagerls.config.js
module.exports = {
modifyWebpack: (config) => config
}
postcss.config.js
in the root of your packagehttps://itnext.io/building-react-library-using-react-lib-scripts-eab6f0fd21f2