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:
17
17
pre :
18
18
- docker pull plotly/imageserver:0.2.1
19
19
- npm install
20
- - npm run watch
20
+ - npm run cibuild
21
21
22
22
test :
23
23
override :
Original file line number Diff line number Diff line change 46
46
"postinstall" : " npm run preprocess" ,
47
47
"bundle" : " node tasks/bundle.js" ,
48
48
"build" : " npm run preprocess && npm run bundle" ,
49
+ "cibuild" : " npm run preprocess && npm run cibundle.js" ,
49
50
"watch" : " node tasks/watch_plotly.js" ,
50
51
"lint" : " cd src && jshint . || true" ,
51
52
"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