Browse Source

Proper name for command used for opening last deployment

master
Leo Lamprecht 8 years ago
parent
commit
d137549694
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 10
      bin/now-open.js
  2. 2
      bin/now.js

10
bin/now-browse.js → bin/now-open.js

@ -26,7 +26,7 @@ const argv = minimist(process.argv.slice(2), {
const help = () => {
console.log(`
${chalk.bold(`${logo} now browse`)}
${chalk.bold(`${logo} now open`)}
${chalk.dim('Options:')}
@ -37,9 +37,9 @@ const help = () => {
${chalk.dim('Examples:')}
${chalk.gray('–')} Open latest deployment for current app
${chalk.gray('–')} Open latest deployment for current project
${chalk.cyan('$ now browse')}
${chalk.cyan('$ now open')}
`)
}
@ -64,7 +64,7 @@ const config = cfg.read()
Promise.resolve(argv.token || config.token || login(apiUrl))
.then(async token => {
try {
await browse(token)
await open(token)
} catch (err) {
error(`Unknown error: ${err}\n${err.stack}`)
process.exit(1)
@ -75,7 +75,7 @@ Promise.resolve(argv.token || config.token || login(apiUrl))
process.exit(1)
})
async function browse(token) {
async function open(token) {
const now = new Now(apiUrl, token, {debug})
let deployments

2
bin/now.js

@ -55,7 +55,7 @@ const commands = new Set([
'billing',
'upgrade',
'downgrade',
'browse'
'open'
])
const aliases = new Map([

Loading…
Cancel
Save