File tree 2 files changed +31
-1
lines changed
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,10 @@ function getMainBundleInfo() {
142
142
'' ,
143
143
constants . partialBundlePaths . map ( makeBundleHeaderInfo ) . join ( '\n' ) ,
144
144
'' ,
145
- 'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.'
145
+ 'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.' ,
146
+ '' ,
147
+ 'Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.' ,
148
+ ''
146
149
] ;
147
150
}
148
151
@@ -209,6 +212,13 @@ function makeBundleInfo(pathObj) {
209
212
'var Plotly = require(\'' + pkgName + '\');' ,
210
213
'```' ,
211
214
'' ,
215
+ '#### dist min npm package (starting in `v1.50.0`)' ,
216
+ '' ,
217
+ 'Install [`' + pkgName + '-min`](https://www.npmjs.com/package/' + pkgName + '-min) with' ,
218
+ '```' ,
219
+ 'npm install ' + pkgName + '-min' ,
220
+ '```' ,
221
+ '' ,
212
222
'#### Other plotly.js entry points' ,
213
223
'' ,
214
224
'| Flavor | Location |' ,
Original file line number Diff line number Diff line change @@ -41,6 +41,26 @@ constants.partialBundlePaths
41
41
} ] )
42
42
. forEach ( syncPartialBundlePkg ) ;
43
43
44
+ // sync "minified partial bundle" packages
45
+ constants . partialBundlePaths
46
+ . map ( function ( d ) {
47
+ return {
48
+ name : 'plotly.js-' + d . name + '-dist-min' ,
49
+ index : d . index ,
50
+ main : 'plotly-' + d . name + '.min.js' ,
51
+ dist : d . distMin ,
52
+ desc : 'Ready-to-use minified plotly.js ' + d . name + ' distributed bundle.' ,
53
+ } ;
54
+ } )
55
+ . concat ( [ {
56
+ name : 'plotly.js-dist-min' ,
57
+ index : path . join ( constants . pathToLib , 'index.js' ) ,
58
+ main : 'plotly.min.js' ,
59
+ dist : constants . pathToPlotlyDistMin ,
60
+ desc : 'Ready-to-use minified plotly.js distributed bundle.' ,
61
+ } ] )
62
+ . forEach ( syncPartialBundlePkg ) ;
63
+
44
64
// sync "locales" package
45
65
syncLocalesPkg ( {
46
66
name : 'plotly.js-locales' ,
You can’t perform that action at this time.
0 commit comments