package: add babel compilation.

This commit is contained in:
Christopher Jeffrey 2016-09-24 01:07:44 -07:00
parent aedbac0be6
commit ed66af64ea
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
3 changed files with 18 additions and 0 deletions

9
.babelrc Normal file
View File

@ -0,0 +1,9 @@
{
"presets": ["es2015"],
"plugins": [
["transform-runtime", {
"polyfill": true,
"regenerator": true
}]
]
}

View File

@ -1,5 +1,6 @@
all:
@npm run browserify
@npm run uglify
clean:
@npm run clean

View File

@ -48,6 +48,11 @@
},
"devDependencies": {
"browserify": "13.1.0",
"babelify": "7.3.0",
"babel-preset-es2015": "6.14.0",
"babel-polyfill": "6.13.0",
"babel-plugin-transform-runtime": "6.12.0",
"babel-plugin-transform-regenerator": "6.14.0",
"hash.js": "1.0.3",
"jsdoc": "3.4.0",
"level-js": "2.2.4",
@ -69,5 +74,8 @@
"net": "./browser/empty.js",
"bcoin-native": "./browser/empty.js",
"secp256k1": "./browser/empty.js"
},
"browserify": {
"transform": ["babelify"]
}
}