Skip to content

Commit

Permalink
feat($cli): Notify users of a newer release (#2121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored and kefranabg committed Jan 12, 2020
1 parent 28380d2 commit 7a09a72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/vuepress/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env node

const updateNotifier = require('update-notifier')

const checkEnv = require('./lib/checkEnv')
const { CLI } = require('./lib/util')
const registerCoreCommands = require('./lib/registerCoreCommands')
Expand All @@ -13,6 +15,7 @@ CLI({
async beforeParse (cli) {
const pkg = require('@vuepress/core/package.json')
checkEnv(pkg)
updateNotifier({ pkg }).notify()
registerCoreCommands(cli, OPTIONS)
await handleUnknownCommand(cli, OPTIONS)
cli.version(pkg.version).help()
Expand Down
3 changes: 2 additions & 1 deletion packages/vuepress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"@vuepress/theme-default": "^1.2.0",
"cac": "^6.3.9",
"envinfo": "^7.2.0",
"opencollective-postinstall": "^2.0.2"
"opencollective-postinstall": "^2.0.2",
"update-notifier": "^4.0.0"
},
"collective": {
"type": "opencollective",
Expand Down

0 comments on commit 7a09a72

Please sign in to comment.