now-flow
Version:
Add deployment workflows to Zeit now
24 lines (21 loc) • 779 B
JavaScript
/**
* Copyright (c) 2018, Neap Pty Ltd.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
const program = require('commander')
const { deploy } = require('./src/nowflow')
program
.command('* <env>')
.usage('Deploy to Zeit Now using a specific environment configuration that will configure the \'now.json\' and the \'package.json\' accordingly.')
.option('-n, --noalias', 'When specified, prevent deployment to be aliased.')
.action((env, options={}) => {
deploy(env, ((options.parent || {}).rawArgs || []).some(x => (x == '--noalias' || x == '--noa')))
})
/*eslint-disable */
program.parse(process.argv)
/*eslint-enable */