ericclemmons / if-env

Simplify npm scripts with `if-env ... && npm run this || npm run that`
MIT License
97 stars 14 forks source link

Breaking - Don't use && and || #4

Closed ericclemmons closed 8 years ago

ericclemmons commented 8 years ago

Example:

if-env NODE_ENV=production && npm run webpack:prod || npm run webpack:dev

If webpack:prod fails, then webpack:dev runs. This isn't the desired behavior, as if-env only helps when everything works.

mcchrish commented 8 years ago

Is there a correct way for it?

ericclemmons commented 8 years ago

This is what I've switched to using:

https://github.com/ericclemmons/per-env

Much better. I'll probably deprecate this project in favor of that.