Internal: upgrade to babel6
Upgrades to babel 6. The major win (aside from some minor performance gains), is that this module can now be `npm link`ed into a babel 6 code base.
This commit is contained in:
parent
07af23cb5a
commit
e7bc048a46
13
.babelrc
13
.babelrc
@ -1,3 +1,14 @@
|
|||||||
{
|
{
|
||||||
"stage": 1
|
"presets": [
|
||||||
|
"stage-1"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"transform-object-rest-spread",
|
||||||
|
"transform-class-properties",
|
||||||
|
"add-module-exports",
|
||||||
|
"closure-elimination",
|
||||||
|
"transform-decorators-legacy",
|
||||||
|
"transform-es2015-modules-commonjs"
|
||||||
|
],
|
||||||
|
"sourceMaps": true
|
||||||
}
|
}
|
||||||
|
18
package.json
18
package.json
@ -5,12 +5,14 @@
|
|||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"config": {
|
"config": {
|
||||||
"ghooks": {
|
"ghooks": {
|
||||||
"pre-commit": "npm run lint && grunt"
|
"pre-commit": "npm run lint && npm run build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint src test",
|
"lint": "eslint src test",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"build": "scripty",
|
||||||
|
"watch": "scripty"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"git": "https://github.com/mdibaiee/hapi-sequelize-crud"
|
"git": "https://github.com/mdibaiee/hapi-sequelize-crud"
|
||||||
@ -21,14 +23,16 @@
|
|||||||
"author": "Mahdi Dibaiee <mdibaiee@aol.com> (http://dibaiee.ir/)",
|
"author": "Mahdi Dibaiee <mdibaiee@aol.com> (http://dibaiee.ir/)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel": "5.8.3",
|
"babel-cli": "^6.10.1",
|
||||||
|
"babel-plugin-add-module-exports": "^0.2.1",
|
||||||
|
"babel-plugin-closure-elimination": "^1.0.6",
|
||||||
|
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||||
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.10.3",
|
||||||
|
"babel-preset-stage-1": "^6.5.0",
|
||||||
"eslint": "2.10.2",
|
"eslint": "2.10.2",
|
||||||
"eslint-config-pichak": "1.0.1",
|
"eslint-config-pichak": "1.0.1",
|
||||||
"ghooks": "1.0.3",
|
"ghooks": "1.0.3",
|
||||||
"grunt": "0.4.5",
|
"scripty": "^1.6.0"
|
||||||
"grunt-babel": "5.0.3",
|
|
||||||
"grunt-contrib-clean": "0.7.0",
|
|
||||||
"grunt-contrib-watch": "0.6.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel": "5.8.3",
|
"babel": "5.8.3",
|
||||||
|
15
scripts/build.sh
Executable file
15
scripts/build.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
|
||||||
|
source "scripts/env.sh"
|
||||||
|
|
||||||
|
babel="./node_modules/.bin/babel"
|
||||||
|
|
||||||
|
build () {
|
||||||
|
$babel "$SRC_DIR" --out-dir "$OUT_DIR" $@
|
||||||
|
}
|
||||||
|
|
||||||
|
build $@
|
7
scripts/env.sh
Normal file
7
scripts/env.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
export SRC_DIR="./src"
|
||||||
|
export OUT_DIR="./build"
|
6
scripts/watch.sh
Executable file
6
scripts/watch.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
./scripts/build.sh --watch
|
Loading…
Reference in New Issue
Block a user