Skip to content

Commit d35c26b

Browse files
committed
add prepublish script to transpile src files with babel
1 parent b44d3bc commit d35c26b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
"dev": "jest && webpack --progress --colors --watch",
1212
"dev-server": "node ./examples/parallax-example/dist/server",
1313
"gh-pages": "NODE_ENV=production webpack --progress --colors",
14-
"test": "jest"
14+
"test": "jest",
15+
"prepublish": "babel ./src --out-dir ./lib --presets es2015,react,stage-0 --plugins babel-plugin-add-module-exports"
1516
},
1617
"jest": {
17-
"modulePaths": ["<rootDir>/src/"]
18+
"modulePaths": [
19+
"<rootDir>/src/"
20+
]
1821
},
1922
"keywords": [
2023
"react",
@@ -30,9 +33,11 @@
3033
"react-proptypes": "^1.0.0"
3134
},
3235
"devDependencies": {
36+
"babel-cli": "^6.24.1",
3337
"babel-core": "^6.23.1",
3438
"babel-jest": "^20.0.3",
3539
"babel-loader": "^6.3.2",
40+
"babel-plugin-add-module-exports": "^0.2.1",
3641
"babel-preset-env": "^1.1.8",
3742
"babel-preset-es2015": "^6.24.1",
3843
"babel-preset-react": "^6.23.0",

0 commit comments

Comments
 (0)