Skip to content

Commit

Permalink
📦 NEW: Update notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadawais committed Mar 19, 2020
1 parent c6ddc4f commit 5591e47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
17 changes: 11 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ process.on('unhandledRejection', err => {
handleError(`UNHANDLED ERROR`, err);
});

const chalk = require('chalk');
const axios = require('axios');
const Table = require('cli-table3');
const comma = require('comma-number');
const cli = require('./utils/cli.js');
const welcome = require('cli-welcome');
const handleError = require('cli-handle-error');
const pkgJSON = require('./package.json');
const axios = require('axios');
const chalk = require('chalk');
const handleError = require('cli-handle-error');
const updateNotifier = require('update-notifier');
const xcolor = cli.flags.xcolor;
const green = chalk.green;
const red = chalk.red;
const dim = chalk.dim;
const cli = require('./utils/cli.js');
const xcolor = cli.flags.xcolor;
const comma = require('comma-number');

(async () => {
welcome(
Expand All @@ -34,6 +35,10 @@ const comma = require('comma-number');
version: `v${pkgJSON.version}`
}
);
updateNotifier({
pkg: pkgJSON,
shouldNotifyInNpmScript: true
}).notify({ isGlobal: true });

// Init.
const [country] = cli.input;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"cli-welcome": "^1.4.0",
"comma-number": "^2.0.1",
"country-emoji": "^1.5.0",
"meow": "^6.0.1"
"meow": "^6.0.1",
"update-notifier": "^4.1.0"
}
}

0 comments on commit 5591e47

Please sign in to comment.