Skip to content

Commit e43867f

Browse files
authored
Merge pull request #5775 from plotly/simplify-make-schema
Simplify makeSchema by returning the results
2 parents ec85800 + d0c7e7b commit e43867f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

tasks/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ tasks.push(function(done) {
7575
}, function() {
7676
prependFile(pathToPlotlyDistWithMeta, header, common.throwOnError);
7777

78-
makeSchema(pathToPlotlyDistWithMeta, pathToSchema)();
78+
makeSchema(pathToPlotlyDistWithMeta, pathToSchema);
7979
done();
8080
});
8181
});

tasks/util/make_schema.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ var path = require('path');
33
var plotlyNode = require('./plotly_node');
44

55
module.exports = function makeSchema(plotlyPath, schemaPath) {
6-
return function() {
7-
var Plotly = plotlyNode(plotlyPath);
6+
var Plotly = plotlyNode(plotlyPath);
87

9-
var plotSchema = Plotly.PlotSchema.get();
10-
var plotSchemaStr = JSON.stringify(plotSchema, null, 1);
11-
fs.writeFileSync(schemaPath, plotSchemaStr);
8+
var plotSchema = Plotly.PlotSchema.get();
9+
var plotSchemaStr = JSON.stringify(plotSchema, null, 1);
10+
fs.writeFileSync(schemaPath, plotSchemaStr);
1211

13-
console.log('ok ' + path.basename(schemaPath));
14-
};
12+
console.log('ok ' + path.basename(schemaPath));
1513
};

0 commit comments

Comments
 (0)