From 9051a0420d405154fa7ca15148e03b9828fa0ec6 Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 18 Mar 2022 14:32:52 -0400 Subject: [PATCH 1/2] call extra-bundles once - now prependFile step is sync --- package.json | 2 +- tasks/extra_bundles.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 50b92e960bd..4116969b97f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "use-draftlogs": "node tasks/use_draftlogs.js", "empty-draftlogs": "node tasks/empty_draftlogs.js", "empty-dist": "node tasks/empty_dist.js", - "build": "npm run empty-dist && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles basic && npm run extra-bundles cartesian && npm run extra-bundles geo && npm run extra-bundles gl2d && npm run extra-bundles gl3d && npm run extra-bundles mapbox && npm run extra-bundles finance && npm run locales && npm run schema dist && npm run stats", + "build": "npm run empty-dist && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles && npm run locales && npm run schema dist && npm run stats", "regl-codegen": "node devtools/regl_codegen/server.js", "cibuild": "npm run empty-dist && npm run preprocess && node tasks/cibundle.js", "watch": "node tasks/watch.js", diff --git a/tasks/extra_bundles.js b/tasks/extra_bundles.js index d92946071dc..7e123cfdc69 100644 --- a/tasks/extra_bundles.js +++ b/tasks/extra_bundles.js @@ -30,6 +30,9 @@ var tasks = []; for(var i = 0; i < list.length; i++) { var opts = list[i]; + // strict bundle is no longer a partial bundle and generated with bundles + if(opts.name === 'strict') continue; + partialBundle(tasks, { name: opts.name, index: opts.index, From 657c08bd1f8b9c93e4102410b5a444a53c243ce9 Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi Date: Fri, 18 Mar 2022 14:57:46 -0400 Subject: [PATCH 2/2] adjust strict bundle headers --- tasks/bundle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/bundle.js b/tasks/bundle.js index 4103e271e52..9b9168abf95 100644 --- a/tasks/bundle.js +++ b/tasks/bundle.js @@ -50,8 +50,8 @@ tasks.push(function(done) { standalone: 'Plotly', pathToMinBundle: pathToPlotlyStrictDistMin }, function() { - prependFile.sync(pathToPlotlyStrictDist, header, common.throwOnError); - prependFile.sync(pathToPlotlyStrictDistMin, header, common.throwOnError); + prependFile.sync(pathToPlotlyStrictDist, header.replace('plotly.js', 'plotly.js (strict)'), common.throwOnError); + prependFile.sync(pathToPlotlyStrictDistMin, header.replace('plotly.js', 'plotly.js (strict - minified)'), common.throwOnError); done(); });