Skip to content

Commit

Permalink
Require Node.js 10
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
sindresorhus committed Feb 12, 2020
1 parent ec9a0a9 commit 67072ef
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: node_js
node_js:
- '12'
- '10'
- '8'
5 changes: 3 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const meow = require('meow');
const logSymbols = require('log-symbols');
const isUp = require('is-up');
const prependHttp = require('prepend-http');

const cli = meow(`
Example
Expand All @@ -18,7 +19,7 @@ if (cli.input.length === 0) {
}

(async () => {
const up = await isUp(cli.input[0]);
const up = await isUp(prependHttp(cli.input[0]));
console.log(up ? `${logSymbols.success} Up` : `${logSymbols.error} Down`);
process.exit(up ? 0 : 2);
process.exitCode = up ? 0 : 2;
})();
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Check whether a website is up or down",
"license": "MIT",
"repository": "sindresorhus/is-up-cli",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
Expand All @@ -13,7 +14,7 @@
"is-up": "cli.js"
},
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -35,14 +36,15 @@
"offline"
],
"dependencies": {
"is-up": "^3.0.0",
"log-symbols": "^2.2.0",
"meow": "^5.0.0"
"is-up": "^4.0.0",
"log-symbols": "^3.0.0",
"meow": "^6.0.0",
"prepend-http": "^3.0.1"
},
"devDependencies": {
"ava": "^0.25.0",
"execa": "^1.0.0",
"strip-ansi": "^5.0.0",
"xo": "^0.23.0"
"ava": "^1.0.0",
"execa": "^4.0.0",
"strip-ansi": "^6.0.0",
"xo": "^0.25.4"
}
}
8 changes: 0 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
<img src="screenshot.png" width="833" height="350">


## Install

```
$ npm install --global is-up-cli
```


## Usage

```
Expand All @@ -24,12 +22,6 @@ $ is-up --help
Exits with code 0 if up and 2 if down
```


## Related

- [is-up](https://github.com/sindresorhus/is-up) - API for this module


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

0 comments on commit 67072ef

Please sign in to comment.