|
1 |
| -var fs = require('fs'); |
2 |
| - |
3 |
| -var browserify = require('browserify'); |
4 |
| - |
5 | 1 | 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'); |
8 | 3 |
|
9 | 4 | /*
|
10 | 5 | * Trimmed down version of ./bundle.js for CI testing
|
11 | 6 | *
|
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: |
15 | 8 | *
|
| 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) |
16 | 12 | */
|
17 | 13 |
|
18 | 14 |
|
19 |
| -// Browserify plotly.js |
20 |
| -browserify(constants.pathToPlotlyIndex, { |
| 15 | +// Browserify plotly.js and plotly.min.js |
| 16 | +_bundle(constants.pathToPlotlyIndex, constants.pathToPlotlyBuild, { |
21 | 17 | standalone: 'Plotly',
|
22 |
| - transform: [compressAttributes] |
23 |
| -}) |
24 |
| -.bundle(common.throwOnError) |
25 |
| -.pipe(fs.createWriteStream(constants.pathToPlotlyBuild)); |
26 |
| - |
| 18 | + pathToMinBundle: constants.pathToPlotlyDistMin, |
| 19 | +}); |
27 | 20 |
|
28 | 21 | // Browserify the geo assets
|
29 |
| -browserify(constants.pathToPlotlyGeoAssetsSrc, { |
| 22 | +_bundle(constants.pathToPlotlyGeoAssetsSrc, constants.pathToPlotlyGeoAssetsDist, { |
30 | 23 | standalone: 'PlotlyGeoAssets'
|
31 |
| -}) |
32 |
| -.bundle(common.throwOnError) |
33 |
| -.pipe(fs.createWriteStream(constants.pathToPlotlyGeoAssetsDist)); |
| 24 | +}); |
0 commit comments