Easily run npm scripts only when in (or not in) a CI environment.
npm i --save-dev if-ci
if-ci ships with two commands, the obvious
if-ci as well as
To use them, just prepend them to any existing command in an npm script.
Will only run the given command when in a CI environment.
If you have multiple commands in a script, just use it again:
Works inversely to
if-ci and will only run the given command when
not in a CI environment.
Pull requests and any issues found are always welcome.
- Fork the project, and preferably create a branch named something like
- Modify as needed
- Make sure all tests continue to pass, and it never hurts to have more tests
- Push & pull request! 🎉
MIT © Bo Lingen / citycide