Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please publish locales on NPM #3083

Closed
brylie opened this issue Oct 6, 2018 · 4 comments · Fixed by #3223
Closed

Please publish locales on NPM #3083

brylie opened this issue Oct 6, 2018 · 4 comments · Fixed by #3223
Labels
feature something new
Milestone

Comments

@brylie
Copy link

brylie commented Oct 6, 2018

The Plotly.js locales are not included in the primary NPM package, probably to keep the package size small. This makes it difficult to include the locales in projects that import Plotly.js from NPM. Please publish the Plotly.js locales as one or more packages on NPM, so they can easily be included in packages that use NPM to manage the Plotly.js dependency.

@etpinard
Copy link
Contributor

etpinard commented Oct 9, 2018

By "primary", I suspect you mean https://www.npmjs.com/package/plotly.js-dist ?

@brylie
Copy link
Author

brylie commented Oct 10, 2018

Jep. There is a fork on NPM that includes locales, but it hasn't been updated in a year. It might be worth separating locales into their own packages, so they can be selectively included in projects where only a few languages are needed.

@etpinard
Copy link
Contributor

Interesting idea @brylie , I thought about adding a plotly.js-topojson during #2670, but yeah locale could benefit from having their own npm packages as well.

Locales files aren't that big, so I'm thinking of publishing a single plotly.js-locales package and then ask users to require the correct file e.g. require('plotly.js-locales/fr.js').

@brylie
Copy link
Author

brylie commented Oct 10, 2018

What might it look like using import?

@etpinard etpinard added the feature something new label Nov 1, 2018
@etpinard etpinard added this to the v1.43.0 milestone Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants