Skip to content

Commit

Permalink
Merge pull request #15 from mxstbr/update-notification
Browse files Browse the repository at this point in the history
Add update notification to CLI
  • Loading branch information
mxstbr authored Jan 11, 2017
2 parents 0c44f46 + 45185be commit 6aebd25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. If a contri

### Added

- Notification to remind you to update to the newest version. (see [#15](https://github.com/mxstbr/micro-analytics/pull/15))

### Changed

## [v1.1.0]
Expand Down
4 changes: 4 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env node

const { exec } = require('shelljs')
const updateNotifier = require('update-notifier');
const pkg = require('./package.json');

updateNotifier({ pkg }).notify();

exec('npm start -- ' + process.argv.join(' '), {
async: true,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"babel-polyfill": "^6.20.0",
"babel-preset-node6": "^11.0.0",
"jest": "^18.1.0",
"request-promise": "^4.1.1"
"request-promise": "^4.1.1",
"update-notifier": "^1.0.3"
},
"execMap": {
"js": "micro"
Expand Down

0 comments on commit 6aebd25

Please sign in to comment.