File tree 4 files changed +26
-8
lines changed
4 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 1
1
const TEST = process . env . BABEL_ENV === 'test' ;
2
+ const CJS = process . env . BABEL_ENV === 'cjs' ;
2
3
3
4
module . exports = {
4
5
presets : [
5
6
[ '@babel/env' , {
6
- modules : TEST ? 'commonjs' : false ,
7
+ modules : TEST || CJS ? 'commonjs' : false ,
7
8
loose : true ,
8
9
targets : TEST ? { node : 'current' } : { } ,
9
10
} ] ,
Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
sudo : false
3
3
node_js :
4
- - 10
5
- - 8
6
- - 7
7
- - 6
4
+ - " stable"
5
+ - " 8"
6
+ - " 6"
7
+
8
+ before_deploy :
9
+ - cd example && npm install && cd ..
10
+ - mkdir _deploy
11
+ - cp example/bundle.js example/index.html _deploy
12
+ deploy :
13
+ provider : pages
14
+ skip-cleanup : true
15
+ github-token : $GITHUB_TOKEN
16
+ local-dir : _deploy
17
+ on :
18
+ branch : master
19
+ node : stable
Original file line number Diff line number Diff line change
1
+ module . exports = require ( '../.babelrc' ) ;
Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"test" : " echo \" Error: no test specified\" && exit 1" ,
8
8
"postinstall" : " npm run build" ,
9
- "build" : " browserify -t [ babelify --plugins transform-es2015-modules-commonjs ] -e app.js > bundle.js"
9
+ "build" : " cross-env BABEL_ENV=cjs browserify -t babelify app.js > bundle.js" ,
10
+ "start" : " ecstatic ."
10
11
},
11
12
"dependencies" : {
13
+ "ecstatic" : " ^3.0.0" ,
12
14
"react" : " ^15.5.4" ,
13
15
"react-dom" : " ^15.5.4"
14
16
},
15
17
"devDependencies" : {
16
- "babelify" : " ^7.3.0" ,
17
- "browserify" : " ^13.3.0"
18
+ "@babel/core" : " 7.0.0-beta.47" ,
19
+ "babelify" : " ^9.0.0" ,
20
+ "browserify" : " ^16.2.2" ,
21
+ "cross-env" : " ^5.1.6"
18
22
}
19
23
}
You can’t perform that action at this time.
0 commit comments