File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 3535 "babel-preset-env" : " 1.4.0" ,
3636 "babel-preset-flow" : " 6.23.0" ,
3737 "copy-webpack-plugin" : " 4.0.1" ,
38+ "copyfiles" : " ^1.2.0" ,
3839 "cross-env" : " 3.1.3" ,
3940 "csv-streamify" : " ^3.0.4" ,
4041 "eslint" : " ^3.4.0" ,
5758 "webpack" : " 2.5.0"
5859 },
5960 "scripts" : {
60- "build-cjs" : " rimraf lib && cross-env BABEL_ENV=cjs babel ./src -d lib --ignore '__tests__' && cd src/ && rsync -Rv **/package.json ../lib" ,
61+ "build-cjs" : " rimraf lib && cross-env BABEL_ENV=cjs babel ./src -d lib --ignore '__tests__'" ,
62+ "postbuild-cjs" : " node scripts/copy.packages.json.js" ,
6163 "build-umd" : " cross-env NODE_ENV=development webpack" ,
6264 "build-min" : " cross-env NODE_ENV=production webpack -p" ,
6365 "rebuild" : " rimraf lib umd && npm run build-cjs && npm run build-umd && npm run build-min" ,
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const copyfiles = require ( 'copyfiles' ) ;
4+
5+ const input = './src/**/package.json' ;
6+ const outputDir = './lib' ;
7+
8+ copyfiles ( [ input , outputDir ] , {
9+ up : 1
10+ } , ( err ) => {
11+ if ( err ) {
12+ console . log ( 'Error copying package.json files: ' + err ) ;
13+ process . exit ( 1 ) ;
14+ } else {
15+ console . log ( 'All package.json files copied correctly.' ) ;
16+ process . exit ( 0 ) ;
17+ }
18+ } ) ;
You can’t perform that action at this time.
0 commit comments