Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tasks/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ function getMainBundleInfo() {
'',
constants.partialBundlePaths.map(makeBundleHeaderInfo).join('\n'),
'',
'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.'
'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.',
'',
'Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.',
''
];
}

Expand Down Expand Up @@ -209,6 +212,13 @@ function makeBundleInfo(pathObj) {
'var Plotly = require(\'' + pkgName + '\');',
'```',
'',
'#### dist min npm package (starting in `v1.50.0`)',
'',
'Install [`' + pkgName + '-min`](https://www.npmjs.com/package/' + pkgName + '-min) with',
'```',
'npm install ' + pkgName + '-min',
'```',
'',
'#### Other plotly.js entry points',
'',
'| Flavor | Location |',
Expand Down
20 changes: 20 additions & 0 deletions tasks/sync_packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ constants.partialBundlePaths
}])
.forEach(syncPartialBundlePkg);

// sync "minified partial bundle" packages
constants.partialBundlePaths
.map(function(d) {
return {
name: 'plotly.js-' + d.name + '-dist-min',
index: d.index,
main: 'plotly-' + d.name + '.min.js',
dist: d.distMin,
desc: 'Ready-to-use minified plotly.js ' + d.name + ' distributed bundle.',
};
})
.concat([{
name: 'plotly.js-dist-min',
index: path.join(constants.pathToLib, 'index.js'),
main: 'plotly.min.js',
dist: constants.pathToPlotlyDistMin,
desc: 'Ready-to-use minified plotly.js distributed bundle.',
}])
.forEach(syncPartialBundlePkg);

// sync "locales" package
syncLocalesPkg({
name: 'plotly.js-locales',
Expand Down