From 79389c1a60b8781d73e78af3d9495bf09f54f02d Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Sat, 22 Oct 2016 11:56:28 +0200 Subject: [PATCH] Put each command into its own line --- bin/now | 30 ++++++++++++++++++++++++++++-- bin/now-static | 3 +++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 bin/now-static diff --git a/bin/now b/bin/now index d542a36..94dc17a 100755 --- a/bin/now +++ b/bin/now @@ -11,6 +11,7 @@ const debug = argv.debug || argv.d; // auto-update checking const update = checkUpdate({ debug }); + const exit = (code) => { update.then(() => process.exit(code)); // don't wait for updates more than a second @@ -19,8 +20,33 @@ const exit = (code) => { }; const defaultCommand = 'deploy'; -const commands = new Set([defaultCommand, 'list', 'ls', 'rm', 'remove', 'alias', 'aliases', 'ln', 'domain', 'domains', 'cert', 'certs', 'secret', 'secrets']); -const aliases = new Map([['ls', 'list'], ['rm', 'remove'], ['ln', 'alias'], ['aliases', 'alias'], ['domain', 'domains'], ['cert', 'certs'], ['secret', 'secrets']]); + +const commands = new Set([ + defaultCommand, + 'list', + 'ls', + 'rm', + 'remove', + 'alias', + 'aliases', + 'ln', + 'domain', + 'domains', + 'cert', + 'certs', + 'secret', + 'secrets' +]); + +const aliases = new Map([ + ['ls', 'list'], + ['rm', 'remove'], + ['ln', 'alias'], + ['aliases', 'alias'], + ['domain', 'domains'], + ['cert', 'certs'], + ['secret', 'secrets'] +]); let cmd = argv._[0]; let args = []; diff --git a/bin/now-static b/bin/now-static new file mode 100644 index 0000000..888959a --- /dev/null +++ b/bin/now-static @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +import chalk from 'chalk';