File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 24
24
"custom-bundle" : " node tasks/custom_bundle.js" ,
25
25
"bundle" : " node tasks/bundle.js" ,
26
26
"extra-bundles" : " node tasks/extra_bundles.js" ,
27
+ "make-schema" : " node tasks/make_schema.js" ,
27
28
"stats" : " node tasks/stats.js" ,
28
29
"find-strings" : " node tasks/find_locale_strings.js" ,
29
30
"preprocess" : " node tasks/preprocess.js" ,
30
- "build" : " node tasks/empty_dist.js && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles && npm run stats" ,
31
+ "build" : " node tasks/empty_dist.js && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles && npm run make-schema && npm run stats" ,
31
32
"cibuild" : " node tasks/empty_dist.js && npm run preprocess && node tasks/cibundle.js" ,
32
33
"watch" : " node tasks/watch.js" ,
33
34
"lint" : " eslint --version && eslint ." ,
Original file line number Diff line number Diff line change @@ -6,13 +6,11 @@ var prependFile = require('prepend-file');
6
6
var constants = require ( './util/constants' ) ;
7
7
var common = require ( './util/common' ) ;
8
8
var _bundle = require ( './util/browserify_wrapper' ) ;
9
- var makeSchema = require ( './make_schema' ) ;
10
9
var wrapLocale = require ( './util/wrap_locale' ) ;
11
10
12
11
var header = constants . licenseDist + '\n' ;
13
12
var pathToLib = constants . pathToLib ;
14
13
var pathToDist = constants . pathToDist ;
15
- var pathToSchema = constants . pathToSchema ;
16
14
var pathToPlotlyDist = constants . pathToPlotlyDist ;
17
15
var pathToPlotlyIndex = constants . pathToPlotlyIndex ;
18
16
var pathToPlotlyDistMin = constants . pathToPlotlyDistMin ;
@@ -67,15 +65,14 @@ tasks.push(function(done) {
67
65
} ) ;
68
66
} ) ;
69
67
70
- // Browserify plotly.js with meta and output plot-schema JSON
68
+ // Browserify plotly.js with meta
71
69
tasks . push ( function ( done ) {
72
70
_bundle ( pathToPlotlyIndex , pathToPlotlyDistWithMeta , {
73
71
standalone : 'Plotly' ,
74
72
noCompress : true
75
73
} , function ( ) {
76
74
prependFile ( pathToPlotlyDistWithMeta , header , common . throwOnError ) ;
77
75
78
- makeSchema ( pathToPlotlyDistWithMeta , pathToSchema ) ;
79
76
done ( ) ;
80
77
} ) ;
81
78
} ) ;
Original file line number Diff line number Diff line change 1
1
var fs = require ( 'fs' ) ;
2
2
var path = require ( 'path' ) ;
3
+
4
+ var constants = require ( './util/constants' ) ;
3
5
var plotlyNode = require ( './util/plotly_node' ) ;
4
6
5
- module . exports = function makeSchema ( plotlyPath , schemaPath ) {
7
+ function makeSchema ( plotlyPath , schemaPath ) {
6
8
var Plotly = plotlyNode ( plotlyPath ) ;
7
9
8
10
var plotSchema = Plotly . PlotSchema . get ( ) ;
9
11
var plotSchemaStr = JSON . stringify ( plotSchema , null , 1 ) ;
10
12
fs . writeFileSync ( schemaPath , plotSchemaStr ) ;
11
13
12
14
console . log ( 'ok ' + path . basename ( schemaPath ) ) ;
13
- } ;
15
+ }
16
+
17
+ var pathToSchema = constants . pathToSchema ;
18
+ var pathToPlotlyDistWithMeta = constants . pathToPlotlyDistWithMeta ;
19
+
20
+ // output plot-schema JSON
21
+ makeSchema ( pathToPlotlyDistWithMeta , pathToSchema ) ;
You can’t perform that action at this time.
0 commit comments