[refactor] add babel

This commit is contained in:
Ziqiang Li 2017-08-07 22:18:51 +08:00
parent 68077ec0eb
commit 6109516b32
2 changed files with 16 additions and 3 deletions

7
.babelrc Normal file
View file

@ -0,0 +1,7 @@
{
"presets": [
[
"es2015"
]
]
}

View file

@ -1,10 +1,12 @@
{ {
"name": "simple-jsonp-promise", "name": "simple-jsonp-promise",
"version": "1.0.2", "version": "1.0.3",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1",
"build": "babel index.js --out-dir .",
"prepublish": "yarn run build"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -19,5 +21,9 @@
"bugs": { "bugs": {
"url": "https://github.com/liziqiang/simple-jsonp-promise/issues" "url": "https://github.com/liziqiang/simple-jsonp-promise/issues"
}, },
"homepage": "https://github.com/liziqiang/simple-jsonp-promise#readme" "homepage": "https://github.com/liziqiang/simple-jsonp-promise#readme",
"dependencies": {
"babel-cli": "6",
"babel-preset-es2015": "6"
}
} }