diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e6682efee7..65117ffe925 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/tasks/bundle_plot_schema.js b/tasks/bundle_plot_schema.js new file mode 100644 index 00000000000..6a5aa71bd5b --- /dev/null +++ b/tasks/bundle_plot_schema.js @@ -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)(); +});