Skip to content

Commit

Permalink
feat(cli): add update-notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Dec 13, 2016
1 parent a2da936 commit 7c79fc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
'use strict';
const meow = require('meow');
const chalk = require('chalk');
const updateNotifier = require('update-notifier');
const pkg = require('../package.json');
const cliHandler = require('../lib/cli-handler');
const cli = meow(`
Usage
Expand All @@ -26,6 +28,11 @@ const cli = meow(`
...
}
*/
updateNotifier({
pkg: pkg,
updateCheckInterval: 1000 * 60 * 60 * 24 * 7
}).notify();

if (cli.input.length === 0 || cli.flags.help) {
cli.showHelp();
} else {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"cross-spawn": "^5.0.1",
"cross-spawn-promise": "^0.9.0",
"meow": "^3.7.0",
"rimraf": "^2.5.4"
"rimraf": "^2.5.4",
"update-notifier": "^1.0.3"
}
}

0 comments on commit 7c79fc7

Please sign in to comment.