Browse Source

Start JS syntax right on top

master
Leo Lamprecht 8 years ago
parent
commit
6186c8b06b
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 9
      bin/now

9
bin/now

@ -1,12 +1,12 @@
#!/bin/bash
// >&/dev/null; exec node $(node -p "process.version[1] >= 7 ? '--harmony-async-await' : '--lazy'") $0 $@
// vi:syntax=javascript
// Native
const {resolve} = require('path')
// Packages
const minimist = require('minimist')
const {spawn} = require('cross-spawn')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
@ -18,7 +18,6 @@ if (!isAsyncSupported()) {
const checkUpdate = require('../lib/check-update')
const {error} = require('../lib/error')
if (nodeVersion.major < 6) {
error('Now requires at least version 6 of Node. Please upgrade!')
process.exit(1)
@ -100,10 +99,8 @@ if (index > -1) {
cmd = aliases.get(cmd) || cmd
}
let bin = resolve(__dirname, 'now-' + cmd)
const bin = resolve(__dirname, 'now-' + cmd)
// Prepare process.argv for subcommand
process.argv = process.argv.slice(0, 2).concat(args);
process.argv = process.argv.slice(0, 2).concat(args)
require(bin)
// vi:syntax=javascript

Loading…
Cancel
Save