diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..c3f18d0 --- /dev/null +++ b/.babelrc @@ -0,0 +1,7 @@ +{ + "presets": [ + [ + "es2015" + ] + ] +} \ No newline at end of file diff --git a/package.json b/package.json index e81938f..f8c2d5f 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,12 @@ { "name": "simple-jsonp-promise", - "version": "1.0.2", + "version": "1.0.3", "description": "", "main": "index.js", "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": { "type": "git", @@ -19,5 +21,9 @@ "bugs": { "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" + } }