ericclemmons / if-env

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

Does it work with husky? #12

Open arunmmanoharan opened 5 years ago

arunmmanoharan commented 5 years ago

HI, I would like to implement this module in husky.

I am using a package called post-npm-install to automatically update dependencies on merge or rebase. I do not want to do it in PROD environment. This is what I have done.

"husky": { "hooks": { "pre-commit": "lint-staged", "post-merge": "if-env NODE_ENV != 'production' && post-npm-install", "post-rebase": "if-env NODE_ENV != 'production' && post-npm-install" } },

This doesnt work. Should I do something to make this work? Please advice.

t0lkman commented 4 years ago

I'm also interested in it... does it support != at all?