#!/usr/bin/env node /* global process */ // Dependencies var cli = require('../index.js'); var pkg = require('../package.json'); var updateNotifier = require('update-notifier'); // Initialize the CLI cli.initialize(function (err) { if (err) { console.log('Error initializing CLI') console.log(err) process.exit(1) } // Check for update var notifier = updateNotifier({ packageName: pkg.name, packageVersion: pkg.version, updateCheckInterval: 1000 * 60 * 60 * 24 * 7 }); // Notify if update available if (notifier.update) { notifier.notify(); } // Run the command cli.run(process.argv); })