From 6109516b32ef15084e985cd02121a9f0f71b11f6 Mon Sep 17 00:00:00 2001 From: Ziqiang Li Date: Mon, 7 Aug 2017 22:18:51 +0800 Subject: [PATCH] [refactor] add babel --- .babelrc | 7 +++++++ package.json | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .babelrc 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" + } }