Adding minified files to dist packages - #1
Conversation
cjwainwright
commented
Jul 25, 2019
@alexcjohnson@etpinard@antoinerg@archmoj Wondered if you’d take a look at this PR to include minified files in the dist packages. See also this comment here scijs/cwise#25 (comment) |
etpinard
commented
Jul 25, 2019
Thanks very much for making a PR @cjwainwright. Your patch looks good. Now, here are the 👍 / 👎 👍
👎
Potential alternatives:
|
archmoj
commented
Jul 25, 2019
Thanks @cjwainwright for the PR. |
cjwainwright
commented
Jul 26, 2019
Thank you for the feedback. @etpinard Creating separate "dist min" packages sounds like the best approach, satisfying both the package size problem and allowing npm install of the min files. I can look at updating this to do that, unless you foresee any other issues with that? @archmoj Can you explain why you would only include min files for some of the bundles? Would creating separate min packages be a good alternative from your perspective. |
The debate is still on between
We'll make a decision before the 1.50.0 release, which is scheduled for late August. |
cjwainwright
commented
Sep 5, 2019
We decided on this option:
Would you be interesting in trying to make a PR? |
etpinard
commented
Sep 5, 2019
(and note 1.50.0 has been pushed back) |
cjwainwright
commented
Sep 6, 2019
etpinard
commented
Sep 6, 2019
Thanks @cjwainwright - your patch looks good. We should add some info about the new partial "dist min" bundles to https://github.com/plotly/plotly.js/blob/master/dist/README.md generated by https://github.com/plotly/plotly.js/blob/master/tasks/stats.js Maybe below line we could have: and maybe below line we could have What do you think? |
cjwainwright
commented
Sep 6, 2019
@etpinard Sounds good, I can add those. I was thinking of making the wording a little more descriptive for the first part, maybe:
Does that sound ok? |
etpinard
commented
Sep 6, 2019
Yep, that's better than my attempt. Thanks!! |
The "dist" bundle packages (e.g. https://www.npmjs.com/package/plotly.js-dist) currently only include un-minified JavaScript. This PR is to include the minified version of the same "dist" file alongside this in the package.
It is common to import packages via npm but not have a minification step in your own build process. It is therefore helpful to have the minified version of the files included in the package.