chore: clean Babel configs (#24)

- avoid using stage-0
- remove deprecated preset-latest in favor of preset-env
This commit is contained in:
Julien Fontanet
2017-11-27 12:59:04 +00:00
committed by GitHub
parent 99d4789049
commit a5b80655da
14 changed files with 80 additions and 206 deletions
+10 -4
View File
@@ -39,8 +39,7 @@
"babel-cli": "^6.24.1",
"babel-plugin-lodash": "^3.3.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"dependency-check": "^2.9.1"
},
"scripts": {
@@ -56,8 +55,15 @@
"lodash"
],
"presets": [
"es2015",
"stage-0"
[
"env",
{
"targets": {
"node": 4
}
}
],
"stage-3"
]
}
}
@@ -133,7 +133,7 @@ const makeJob = (cronPattern, fn) => {
class LoadBalancerPlugin {
constructor (xo) {
this.xo = xo
this._job = makeJob(`*/${EXECUTION_DELAY} * * * *`, ::this._executePlans)
this._job = makeJob(`*/${EXECUTION_DELAY} * * * *`, this._executePlans.bind(this))
}
async configure ({ plans }) {