File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ dependencies:
1717 pre :
1818 - docker pull plotly/imageserver:0.2.1
1919 - npm install
20- - npm run watch
20+ - npm run cibuild
2121
2222test :
2323 override :
Original file line number Diff line number Diff line change 4646 "postinstall" : " npm run preprocess" ,
4747 "bundle" : " node tasks/bundle.js" ,
4848 "build" : " npm run preprocess && npm run bundle" ,
49+ "cibuild" : " npm run preprocess && npm run cibundle.js" ,
4950 "watch" : " node tasks/watch_plotly.js" ,
5051 "lint" : " cd src && jshint . || true" ,
5152 "test-jasmine" : " karma start test/jasmine/karma.conf.js" ,
Original file line number Diff line number Diff line change 1+ var fs = require ( 'fs' ) ;
2+
3+ var browserify = require ( 'browserify' ) ;
4+
5+ var compressAttributes = require ( './util/compress_attributes' ) ;
6+ var appendVersion = require ( './util/append_version' ) ;
7+ var constants = require ( './util/constants' ) ;
8+
9+ /*
10+ * Trimmed down version of ./bundle.js for CI testing
11+ *
12+ * Outputs plotly.js bundle in build/ and
13+ * plotly-geo-assets.js bundle in dist/
14+ * in accordance with test/image/index.html
15+ *
16+ */
17+
18+
19+ // Browserify plotly.js
20+ browserify ( constants . pathToPlotlySrc , {
21+ standalone : 'Plotly' ,
22+ transform : [ compressAttributes ]
23+ } )
24+ . bundle ( function ( err ) {
25+ if ( err ) throw err ;
26+ } )
27+ . pipe ( fs . createWriteStream ( constants . pathToPlotlyBuild ) )
28+ . on ( 'finish' , function ( ) {
29+ appendVersion ( constants . pathToPlotlyDist , { object : 'Plotly' } ) ;
30+ } ) ;
31+
32+
33+ // Browserify the geo assets
34+ browserify ( constants . pathToPlotlyGeoAssetsSrc , {
35+ standalone : 'PlotlyGeoAssets'
36+ } )
37+ . bundle ( function ( err ) {
38+ if ( err ) throw err ;
39+ } )
40+ . pipe ( fs . createWriteStream ( constants . pathToPlotlyGeoAssetsDist ) )
41+ . on ( 'finish' , function ( ) {
42+ appendVersion ( constants . pathToPlotlyGeoAssetsDist , { object : 'PlotlyGeoAssets' } ) ;
43+ } ) ;
You can’t perform that action at this time.
0 commit comments