Skip to content

Commit d4f216f

Browse files
committed
tasks: make cibundle output plotly.min.js
- so that require.js test can be properly ran on each build!
1 parent e16d2f7 commit d4f216f

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

tasks/cibundle.js

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,24 @@
1-
var fs = require('fs');
2-
3-
var browserify = require('browserify');
4-
51
var constants = require('./util/constants');
6-
var common = require('./util/common');
7-
var compressAttributes = require('./util/compress_attributes');
2+
var _bundle = require('./util/browserify_wrapper');
83

94
/*
105
* Trimmed down version of ./bundle.js for CI testing
116
*
12-
* Outputs plotly.js bundle in build/ and
13-
* plotly-geo-assets.js bundle in dist/
14-
* in accordance with test/image/index.html
7+
* Outputs:
158
*
9+
* - plotly.js bundle in build/
10+
* - plotly-geo-assets.js bundle in dist/ (in accordance with test/image/index.html)
11+
* - plotly.min.js bundle in dist/ (for requirejs test)
1612
*/
1713

1814

19-
// Browserify plotly.js
20-
browserify(constants.pathToPlotlyIndex, {
15+
// Browserify plotly.js and plotly.min.js
16+
_bundle(constants.pathToPlotlyIndex, constants.pathToPlotlyBuild, {
2117
standalone: 'Plotly',
22-
transform: [compressAttributes]
23-
})
24-
.bundle(common.throwOnError)
25-
.pipe(fs.createWriteStream(constants.pathToPlotlyBuild));
26-
18+
pathToMinBundle: constants.pathToPlotlyDistMin,
19+
});
2720

2821
// Browserify the geo assets
29-
browserify(constants.pathToPlotlyGeoAssetsSrc, {
22+
_bundle(constants.pathToPlotlyGeoAssetsSrc, constants.pathToPlotlyGeoAssetsDist, {
3023
standalone: 'PlotlyGeoAssets'
31-
})
32-
.bundle(common.throwOnError)
33-
.pipe(fs.createWriteStream(constants.pathToPlotlyGeoAssetsDist));
24+
});

0 commit comments

Comments
 (0)