js-build-scripts
v0.1.1
Published
## Install
Downloads
9
Readme
js-build-scripts
Install
yarn add js-build-scripts --dev
How to use
Add command to your projects npm scripts
eg.
{
"scripts": {
"webpack:build": "./node_modules/js-build-scripts/bin.js webpack:build"
},
"babel": {
"extends": "./node_modules/js-build-scripts/configs/babelrc.json"
}
}
Commands
webpack:build
outputs into ./build
webpack:dev
runs webpack-dev-server
karma
karma:watch
babel
./src as input, outputs into ./es
Webpack
Adding to resolve path by appending to the NODE_ENV env vars
NODE_PATHS=./foo:./bar
Override app paths
--app-index
--html-index
--context
--output-path
--resolve-node-modules
--favicon-path
Babel
Since babel doesn't accept babelrc path as an argument you will have to extend the provided babel configs into your project's package.json for this to work.
// package.json
{
...
"babel": {
"extends": "./node_modules/js-build-scripts/configs/babelrc.json"
}
}
For NODE environments extend the babelrc.node.json
file