File tree Expand file tree Collapse file tree 4 files changed +40
-14
lines changed Expand file tree Collapse file tree 4 files changed +40
-14
lines changed Original file line number Diff line number Diff line change 2121 " plotly"
2222 ],
2323 "scripts" : {
24- "preprocess" : " ./tasks/vendor_to_dist.sh && node tasks/preprocess.js" ,
24+ "preprocess" : " node tasks/preprocess.js" ,
2525 "bundle" : " node tasks/bundle.js" ,
2626 "header-dist" : " node tasks/header_dist.js" ,
2727 "stats" : " node tasks/stats.js" ,
2828 "find-strings" : " node tasks/find_locale_strings.js" ,
29- "build" : " npm run preprocess && npm run find-strings && npm run bundle && npm run header-dist && npm run stats" ,
30- "cibuild" : " npm run preprocess && node tasks/cibundle.js" ,
29+ "build" : " node tasks/empty_dist.js && npm run preprocess && node tasks/topojson_dist.js && npm run find-strings && npm run bundle && npm run header-dist && npm run stats" ,
30+ "cibuild" : " node tasks/empty_dist.js && npm run preprocess && node tasks/cibundle.js" ,
3131 "watch" : " node tasks/watch.js" ,
3232 "lint" : " eslint --version && eslint ." ,
3333 "lint-fix" : " eslint . --fix || true" ,
Original file line number Diff line number Diff line change 1+ var fs = require ( 'fs-extra' ) ;
2+ var common = require ( './util/common' ) ;
3+ var constants = require ( './util/constants' ) ;
4+
5+ // main
6+ emptyDist ( ) ;
7+
8+ function emptyDist ( ) {
9+ var dir = constants . pathToDist ;
10+ if ( common . doesDirExist ( dir ) ) {
11+ console . log ( 'empty ' + dir ) ;
12+ try {
13+ fs . rmdirSync ( dir , { recursive : true } ) ;
14+ } catch ( err ) {
15+ console . error ( err ) ;
16+ }
17+
18+ // create folder
19+ fs . mkdirSync ( dir ) ;
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ var fs = require ( 'fs-extra' ) ;
2+ var common = require ( './util/common' ) ;
3+ var constants = require ( './util/constants' ) ;
4+
5+ // main
6+ copyTopojsonFiles ( ) ;
7+
8+ // copy topojson files from vendor/ to dist/
9+ function copyTopojsonFiles ( ) {
10+ fs . copy (
11+ constants . pathToTopojsonVendor ,
12+ constants . pathToTopojsonDist ,
13+ { clobber : true } ,
14+ common . throwOnError
15+ ) ;
16+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments