if-env
Simplify npm scripts with
if-env ... && npm run this || npm run that
I recommend switching to per-env
, which is much simpler and much more powerful!
Suppose you want to simplify development and be able to run npm start
in all environments & run the correct scripts.
Your package.json
might look like this:
"scripts":
The problem is, this doesn't work in all environments.
Instead, you can write:
"scripts":
Usage
1. Install
$ npm install
package.json
2. Add to "scripts":
License
MIT © Eric Clemmons 2015