Browse Source

Removed unused code

master
Leo Lamprecht 8 years ago
parent
commit
06fad401bf
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 25
      bin/now
  2. 2
      package.json

25
bin/now

@ -6,7 +6,6 @@
const {resolve} = require('path')
// Packages
const minimist = require('minimist')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
@ -15,7 +14,6 @@ if (!isAsyncSupported()) {
}
// Ours
const checkUpdate = require('../lib/check-update')
const {error} = require('../lib/error')
if (nodeVersion.major < 6) {
@ -23,29 +21,6 @@ if (nodeVersion.major < 6) {
process.exit(1)
}
const argv = minimist(process.argv.slice(2))
// options
const debug = argv.debug || argv.d
// Disable updates by default
let update = false
// auto-update checking
// only for the npm version, not the enclosed one
if (!process.pkg) {
update = checkUpdate({debug})
}
const exit = code => {
if (update) {
update.then(() => process.exit(code))
}
// don't wait for updates more than a second
// when the process really wants to exit
setTimeout(() => process.exit(code), 1000)
}
const defaultCommand = 'deploy'
const commands = new Set([

2
package.json

@ -43,6 +43,8 @@
],
"rules": {
"import/no-unresolved": 0,
"import/no-unassigned-import": 0,
"import/no-dynamic-require": 0,
"max-depth": 0,
"no-use-before-define": 0,
"complexity": 0,

Loading…
Cancel
Save