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 2424 "custom-bundle" : " node tasks/custom_bundle.js" ,
2525 "bundle" : " node tasks/bundle.js" ,
2626 "extra-bundles" : " node tasks/extra_bundles.js" ,
27+ "make-schema" : " node tasks/make_schema.js" ,
2728 "stats" : " node tasks/stats.js" ,
2829 "find-strings" : " node tasks/find_locale_strings.js" ,
2930 "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" ,
3132 "cibuild" : " node tasks/empty_dist.js && npm run preprocess && node tasks/cibundle.js" ,
3233 "watch" : " node tasks/watch.js" ,
3334 "lint" : " eslint --version && eslint ." ,
Original file line number Diff line number Diff line change @@ -6,13 +6,11 @@ var prependFile = require('prepend-file');
66var constants = require ( './util/constants' ) ;
77var common = require ( './util/common' ) ;
88var _bundle = require ( './util/browserify_wrapper' ) ;
9- var makeSchema = require ( './make_schema' ) ;
109var wrapLocale = require ( './util/wrap_locale' ) ;
1110
1211var header = constants . licenseDist + '\n' ;
1312var pathToLib = constants . pathToLib ;
1413var pathToDist = constants . pathToDist ;
15- var pathToSchema = constants . pathToSchema ;
1614var pathToPlotlyDist = constants . pathToPlotlyDist ;
1715var pathToPlotlyIndex = constants . pathToPlotlyIndex ;
1816var pathToPlotlyDistMin = constants . pathToPlotlyDistMin ;
@@ -67,15 +65,14 @@ tasks.push(function(done) {
6765 } ) ;
6866} ) ;
6967
70- // Browserify plotly.js with meta and output plot-schema JSON
68+ // Browserify plotly.js with meta
7169tasks . push ( function ( done ) {
7270 _bundle ( pathToPlotlyIndex , pathToPlotlyDistWithMeta , {
7371 standalone : 'Plotly' ,
7472 noCompress : true
7573 } , function ( ) {
7674 prependFile ( pathToPlotlyDistWithMeta , header , common . throwOnError ) ;
7775
78- makeSchema ( pathToPlotlyDistWithMeta , pathToSchema ) ;
7976 done ( ) ;
8077 } ) ;
8178} ) ;
Original file line number Diff line number Diff line change 11var fs = require ( 'fs' ) ;
22var path = require ( 'path' ) ;
3+
4+ var constants = require ( './util/constants' ) ;
35var plotlyNode = require ( './util/plotly_node' ) ;
46
5- module . exports = function makeSchema ( plotlyPath , schemaPath ) {
7+ function makeSchema ( plotlyPath , schemaPath ) {
68 var Plotly = plotlyNode ( plotlyPath ) ;
79
810 var plotSchema = Plotly . PlotSchema . get ( ) ;
911 var plotSchemaStr = JSON . stringify ( plotSchema , null , 1 ) ;
1012 fs . writeFileSync ( schemaPath , plotSchemaStr ) ;
1113
1214 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