From 59734bf31bf650e08867a7da4b2ee9b0090797bd Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Wed, 11 Jan 2017 15:15:12 +0100 Subject: [PATCH] MOAR comments --- bin/now.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/now.js b/bin/now.js index 9f0fda8..0afc8c5 100755 --- a/bin/now.js +++ b/bin/now.js @@ -11,10 +11,12 @@ const updateNotifier = require('update-notifier') const {error} = require('../lib/error') const pkg = require('../package') +// Support for keywords "async" and "await" require('async-to-gen/register')({ excludes: null }) +// Throw an error if node version is too low if (nodeVersion.major < 6) { error('Now requires at least version 6 of Node. Please upgrade!') process.exit(1) @@ -25,6 +27,7 @@ if (!process.pkg) { updateNotifier({pkg}).notify() } +// This command will be run if no other sub command is specified const defaultCommand = 'deploy' const commands = new Set([ @@ -82,4 +85,6 @@ const bin = resolve(__dirname, 'now-' + cmd + '.js') // Prepare process.argv for subcommand process.argv = process.argv.slice(0, 2).concat(args) + +// Load sub command require(bin)