UNPKG

653 BPlain TextView Raw
1#!/usr/bin/env node
2/* global process */
3
4// Dependencies
5var cli = require('../index.js');
6var pkg = require('../package.json');
7var updateNotifier = require('update-notifier');
8
9// Initialize the CLI
10cli.initialize(function (err) {
11 if (err) {
12 console.log('Error initializing CLI')
13 console.log(err)
14 process.exit(1)
15 }
16
17 // Check for update
18 var notifier = updateNotifier({
19 packageName: pkg.name,
20 packageVersion: pkg.version,
21 updateCheckInterval: 1000 * 60 * 60 * 24 * 7
22 });
23
24 // Notify if update available
25 if (notifier.update) {
26 notifier.notify();
27 }
28
29 // Run the command
30 cli.run(process.argv);
31})
\No newline at end of file