New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

if-ci

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

if-ci - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

bin/if-ci.js

7

package.json
{
"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 · [![Version](https://img.shields.io/npm/v/if-ci.svg?style=flat-square&maxAge=3600)](https://www.npmjs.com/package/if-ci) [![License](https://img.shields.io/npm/l/if-ci.svg?style=flat-square&maxAge=3600)](https://www.npmjs.com/package/if-ci) [![Travis CI](https://img.shields.io/travis/citycide/if-ci.svg?style=flat-square&maxAge=3600)](https://travis-ci.org/citycide/if-ci) [![JavaScript Standard Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc