Skip to content

Commit

Permalink
feat: notify on new version
Browse files Browse the repository at this point in the history
  • Loading branch information
trs committed Nov 24, 2017
1 parent 812ccf0 commit 4e36efb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"dependencies": {
"columnify": "^1.5.4",
"commander": "^2.11.0",
"configstore": "^3.1.1"
"configstore": "^3.1.1",
"update-notifier": "^2.3.0"
}
}
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
const program = require('commander');
const updateNotifier = require('update-notifier');

const {version} = require('../package.json');
const {name, version} = require('../package.json');

const ls = require('./commands/ls');
const rm = require('./commands/rm');
const use = require('./commands/use');
const add = require('./commands/add');
// const {login} = require('./commands/login');

updateNotifier({pkg: {name, version}, updateCheckInterval: 1000 * 60 * 60 * 6})
.notify({isGlobal: true});

function setup(argv) {
program.version(version);

Expand Down

0 comments on commit 4e36efb

Please sign in to comment.