Browse Source

add node 6 support using babel

Fixes #6
master
Feross Aboukhadijeh 7 years ago
parent
commit
b9a9c2e4cf
  1. 5
      .babelrc
  2. 1
      .gitignore
  3. 9
      package.json
  4. 2
      src/cmd.js

5
.babelrc

@ -0,0 +1,5 @@
{
"plugins": [
"@babel/plugin-transform-async-to-generator"
]
}

1
.gitignore

@ -0,0 +1 @@
dist/

9
package.json

@ -7,7 +7,7 @@
"email": "feross@feross.org", "email": "feross@feross.org",
"url": "https://feross.org" "url": "https://feross.org"
}, },
"bin": "cmd.js", "bin": "dist/cmd.js",
"bugs": { "bugs": {
"url": "https://github.com/feross/thanks/issues" "url": "https://github.com/feross/thanks/issues"
}, },
@ -31,6 +31,9 @@
"text-table": "^0.2.0" "text-table": "^0.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.0.0-beta.39",
"@babel/core": "^7.0.0-beta.39",
"@babel/plugin-transform-async-to-generator": "^7.0.0-beta.39",
"standard": "*" "standard": "*"
}, },
"keywords": [ "keywords": [
@ -54,6 +57,8 @@
"url": "git://github.com/feross/thanks.git" "url": "git://github.com/feross/thanks.git"
}, },
"scripts": { "scripts": {
"test": "standard && ./cmd.js --no-open" "build": "babel src/cmd.js > dist/cmd.js",
"test": "standard && ./cmd.js --no-open",
"prepublish": "npm run build"
} }
} }

2
cmd.js → src/cmd.js

@ -19,7 +19,7 @@ const { readFile } = require('fs')
const { stripIndent } = require('common-tags') const { stripIndent } = require('common-tags')
const PromptConfirm = require('prompt-confirm') const PromptConfirm = require('prompt-confirm')
const thanks = require('./') const thanks = require('../')
const readFileAsync = pify(readFile) const readFileAsync = pify(readFile)
const readPackageTreeAsync = pify(readPackageTree) const readPackageTreeAsync = pify(readPackageTree)
Loading…
Cancel
Save