Skip to content

circleci update plot-schema.json during publish job #3160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ jobs:
- checkout
- attach_workspace:
at: ~/plotly.js
- run:
name: Update plot-schema.json
command: node tasks/bundle_plot_schema.js
- store_artifacts:
path: build/plotly.js
destination: /plotly.js
Expand Down
19 changes: 19 additions & 0 deletions tasks/bundle_plot_schema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var constants = require('./util/constants');
var _bundle = require('./util/browserify_wrapper');
var makeSchema = require('./util/make_schema');

/*
* Trimmed down version of ./bundle.js for CI testing
*
* Outputs:
*
* - plotly-with-meta.js bundle in dist/
* - plot-schema.json in dist/ (for reference)
*/

_bundle(constants.pathToPlotlyIndex, constants.pathToPlotlyDistWithMeta, {
standalone: 'Plotly',
noCompress: true
}, function() {
makeSchema(constants.pathToPlotlyDistWithMeta, constants.pathToSchema)();
});