Skip to content

Commit 6432438

Browse files
committed
Use Babel to build
1 parent ab9a46c commit 6432438

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.babelrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"presets": [
3+
"es2015",
4+
"stage-0"
5+
],
6+
"plugins": [
7+
"add-module-exports"
8+
],
9+
"env": {
10+
"development": {
11+
"plugins": [
12+
"typecheck",
13+
"syntax-flow",
14+
"transform-flow-strip-types"
15+
]
16+
},
17+
"production": {
18+
"plugins": [
19+
"syntax-flow",
20+
"transform-flow-strip-types"
21+
]
22+
}
23+
}
24+
}

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
"object-unfreeze": "^1.0.2"
2727
},
2828
"devDependencies": {
29+
"babel-cli": "^6.10.1",
30+
"babel-plugin-add-module-exports": "^0.2.1",
31+
"babel-plugin-syntax-flow": "^6.8.0",
32+
"babel-plugin-transform-flow-strip-types": "^6.8.0",
33+
"babel-plugin-typecheck": "^3.9.0",
34+
"babel-preset-es2015": "^6.9.0",
35+
"babel-preset-stage-0": "^6.5.0",
2936
"chai": "^3.5.0",
3037
"jsdom": "^8.1.0",
3138
"pragmatist": "^3.0.21",
@@ -38,10 +45,9 @@
3845
"pragmatist": "node ./node_modules/.bin/pragmatist --es5",
3946
"lint": "npm run pragmatist lint",
4047
"test": "npm run pragmatist test --type-annotations",
41-
"build": "npm run pragmatist build",
48+
"build": "babel ./src --out-dir ./dist",
4249
"watch": "npm run pragmatist watch",
4350
"watch-lint": "npm run pragmatist watch-lint",
44-
"watch-test": "npm run pragmatist watch-test --type-annotations",
45-
"watch-build": "npm run pragmatist watch-build"
51+
"watch-test": "npm run pragmatist watch-test --type-annotations"
4652
}
4753
}

0 commit comments

Comments
 (0)