Natural Performance Manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

js-build-scripts

0.1.1 • Public • Published

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

Keywords

none

install

npm i js-build-scripts

Downloadsweekly downloads

7

version

0.1.1

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability