Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "if-ci", | ||
"version": "1.0.1", | ||
"description": "Easily run npm scripts only when in a CI environment.", | ||
"version": "1.1.0", | ||
"description": "Easily run npm scripts only when in (or not in) a CI environment.", | ||
"author": { | ||
@@ -30,3 +30,4 @@ "name": "Bo Lingen", | ||
"bin": { | ||
"if-ci": "./bin/index.js" | ||
"if-ci": "./bin/if-ci.js", | ||
"if-not-ci": "./bin/if-not-ci.js" | ||
}, | ||
@@ -33,0 +34,0 @@ "files": [ |
# if-ci · [](https://www.npmjs.com/package/if-ci) [](https://www.npmjs.com/package/if-ci) [](https://travis-ci.org/citycide/if-ci) [](https://standardjs.com) | ||
> Easily run npm scripts only when in a CI environment. | ||
> Easily run npm scripts only when in (or not in) a CI environment. | ||
@@ -13,4 +13,9 @@ ## installation | ||
Just prefix any command in an npm script with `if-ci` like so: | ||
`if-ci` ships with two commands, the obvious `if-ci` as well as `if-not-ci`. | ||
To use them, just prepend them to any existing command in an npm script. | ||
### if-ci | ||
Will only run the given command when in a CI environment. | ||
```json | ||
@@ -38,2 +43,17 @@ { | ||
### if-not-ci | ||
Works inversely to `if-ci` and will only run the given command when | ||
not in a CI environment. | ||
```json | ||
{ | ||
"name": "my-great-package", | ||
"version": "1.2.34", | ||
"scripts": { | ||
"maybeEcho": "if-not-ci echo \"hello\" && if-not-ci echo \"world!\"" | ||
} | ||
} | ||
``` | ||
## contributing | ||
@@ -40,0 +60,0 @@ |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
4220
5
70
8
1