Skip to content

Commit 6aebd25

Browse files
authored
Merge pull request #15 from mxstbr/update-notification
Add update notification to CLI
2 parents 0c44f46 + 45185be commit 6aebd25

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. If a contri
88

99
### Added
1010

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

1315
## [v1.1.0]

cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env node
22

33
const { exec } = require('shelljs')
4+
const updateNotifier = require('update-notifier');
5+
const pkg = require('./package.json');
6+
7+
updateNotifier({ pkg }).notify();
48

59
exec('npm start -- ' + process.argv.join(' '), {
610
async: true,

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"babel-polyfill": "^6.20.0",
3737
"babel-preset-node6": "^11.0.0",
3838
"jest": "^18.1.0",
39-
"request-promise": "^4.1.1"
39+
"request-promise": "^4.1.1",
40+
"update-notifier": "^1.0.3"
4041
},
4142
"execMap": {
4243
"js": "micro"

0 commit comments

Comments
 (0)