Skip to content

Commit 7c79fc7

Browse files
committed
feat(cli): add update-notifier
1 parent a2da936 commit 7c79fc7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

bin/cmd.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
'use strict';
33
const meow = require('meow');
44
const chalk = require('chalk');
5+
const updateNotifier = require('update-notifier');
6+
const pkg = require('../package.json');
57
const cliHandler = require('../lib/cli-handler');
68
const cli = meow(`
79
Usage
@@ -26,6 +28,11 @@ const cli = meow(`
2628
...
2729
}
2830
*/
31+
updateNotifier({
32+
pkg: pkg,
33+
updateCheckInterval: 1000 * 60 * 60 * 24 * 7
34+
}).notify();
35+
2936
if (cli.input.length === 0 || cli.flags.help) {
3037
cli.showHelp();
3138
} else {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"cross-spawn": "^5.0.1",
3838
"cross-spawn-promise": "^0.9.0",
3939
"meow": "^3.7.0",
40-
"rimraf": "^2.5.4"
40+
"rimraf": "^2.5.4",
41+
"update-notifier": "^1.0.3"
4142
}
4243
}

0 commit comments

Comments
 (0)