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 21
21
" plotly"
22
22
],
23
23
"scripts" : {
24
- "preprocess" : " ./tasks/vendor_to_dist.sh && node tasks/preprocess.js" ,
24
+ "preprocess" : " node tasks/preprocess.js" ,
25
25
"bundle" : " node tasks/bundle.js" ,
26
26
"header-dist" : " node tasks/header_dist.js" ,
27
27
"stats" : " node tasks/stats.js" ,
28
28
"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" ,
31
31
"watch" : " node tasks/watch.js" ,
32
32
"lint" : " eslint --version && eslint ." ,
33
33
"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