diff --git a/package.json b/package.json index 81d31d45d..9d81a2252 100644 --- a/package.json +++ b/package.json @@ -154,6 +154,7 @@ "sw-precache-webpack-plugin": "^0.11.2", "tmp": "0.0.31", "unfetch": "^3.0.0", + "update-notifier": "^2.2.0", "url-loader": "^0.5.8", "webpack": "^2.3.3", "webpack-chunk-hash": "^0.4.0", diff --git a/src/index.js b/src/index.js index cc654767b..c6d599375 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ #!/usr/bin/env node +import updateNotifier from 'update-notifier'; import yargs from 'yargs'; import create from './commands/create'; import build from './commands/build'; @@ -16,6 +17,8 @@ checkVersion(); installHooks(); +updateNotifier({pkg}).notify(); + yargs .command(create) .command(build) @@ -31,3 +34,4 @@ yargs .demandCommand() .strict() .argv; + diff --git a/yarn.lock b/yarn.lock index 63dda8b91..7120e63ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7288,7 +7288,7 @@ update-notifier@^1.0.3: semver-diff "^2.0.0" xdg-basedir "^2.0.0" -update-notifier@^2.1.0: +update-notifier@^2.1.0, update-notifier@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.2.0.tgz#1b5837cf90c0736d88627732b661c138f86de72f" dependencies: