.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / is-ci / README.md
1 # is-ci
2
3 Returns `true` if the current environment is a Continuous Integration
4 server.
5
6 Please [open an issue](https://github.com/watson/is-ci/issues) if your
7 CI server isn't properly detected :)
8
9 [![npm](https://img.shields.io/npm/v/is-ci.svg)](https://www.npmjs.com/package/is-ci)
10 [![Build status](https://travis-ci.org/watson/is-ci.svg?branch=master)](https://travis-ci.org/watson/is-ci)
11 [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
12
13 ## Installation
14
15 ```bash
16 npm install is-ci --save
17 ```
18
19 ## Programmatic Usage
20
21 ```js
22 const isCI = require('is-ci')
23
24 if (isCI) {
25   console.log('The code is running on a CI server')
26 }
27 ```
28
29 ## CLI Usage
30
31 For CLI usage you need to have the `is-ci` executable in your `PATH`.
32 There's a few ways to do that:
33
34 - Either install the module globally using `npm install is-ci -g`
35 - Or add the module as a dependency to your app in which case it can be
36   used inside your package.json scripts as is
37 - Or provide the full path to the executable, e.g.
38   `./node_modules/.bin/is-ci`
39
40 ```bash
41 is-ci && echo "This is a CI server"
42 ```
43
44 ## Supported CI tools
45
46 Refer to [ci-info](https://github.com/watson/ci-info#supported-ci-tools) docs for all supported CI's
47
48 ## License
49
50 [MIT](LICENSE)