Browse Source

Use async-to-gen for all Node versions

master
Leo Lamprecht 8 years ago
parent
commit
9f073ad25c
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 9
      bin/now
  2. 2
      bin/now-alias
  3. 2
      bin/now-certs
  4. 2
      bin/now-deploy
  5. 2
      bin/now-dns
  6. 2
      bin/now-domains
  7. 3
      bin/now-list
  8. 2
      bin/now-remove
  9. 2
      bin/now-secrets
  10. 1
      package.json

9
bin/now

@ -1,22 +1,17 @@
#!/bin/bash
// >&/dev/null; exec node $(node -p "process.version[1] >= 7 ? '--harmony-async-await' : '--lazy'") $0 $@
// vi:syntax=javascript
#!/usr/bin/env node
// Native
const {resolve} = require('path')
// Packages
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
const updateNotifier = require('update-notifier')
// Ours
const {error} = require('../lib/error')
const pkg = require('../package')
if (!isAsyncSupported()) {
require('async-to-gen/register')
}
require('async-to-gen/register')
if (nodeVersion.major < 6) {
error('Now requires at least version 6 of Node. Please upgrade!')

2
bin/now-alias

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Packages
const chalk = require('chalk')

2
bin/now-certs

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Native
const path = require('path')

2
bin/now-deploy

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Native
const {resolve} = require('path')

2
bin/now-dns

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Packages
const chalk = require('chalk')

2
bin/now-domains

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Packages
const chalk = require('chalk')

3
bin/now-list

@ -1,5 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Packages
const fs = require('fs-promise')

2
bin/now-remove

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Packages
const minimist = require('minimist')

2
bin/now-secrets

@ -1,4 +1,4 @@
#!/usr/bin/env node --harmony-async-await
#!/usr/bin/env node
// Packages
const chalk = require('chalk')

1
package.json

@ -72,7 +72,6 @@
"graceful-fs": "^4.1.11",
"ignore": "^3.2.0",
"ini": "^1.3.4",
"is-async-supported": "^1.2.0",
"is-url": "^1.2.2",
"minimist": "^1.2.0",
"ms": "^0.7.2",

Loading…
Cancel
Save