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

Lay groundwork for distribution via npm and CDNs #493

Closed
erictheise opened this issue Jul 22, 2021 · 4 comments
Closed

Lay groundwork for distribution via npm and CDNs #493

erictheise opened this issue Jul 22, 2021 · 4 comments

Comments

@erictheise
Copy link
Member

erictheise commented Jul 22, 2021

It'd be useful for releases to be available via npm and, indeed, there was some movement in this direction in #138 when v0.8.0 was released last year. Lodging this as an issue and looking into this over the next few days.

@Malvoz
Copy link
Member

Malvoz commented Jul 22, 2021

Perhaps a bit too much to ask as part of this issue, but it'd be really neat if we - at some point - could serve assets over a CDN. Apart from the potential performance benefits we could also use absolute URLs in our HTML markup examples, which would provide developers with a third easy-to-use installation alternative, as it is simply a matter of copy and paste. I have no personal experience in this area, but this resource may be useful: https://unpkg.com/#workflow.

@erictheise
Copy link
Member Author

I was able to publish 0.8.0 to npm. It's at https://www.npmjs.com/package/@maps4html/web-map-custom-element

One caveat is that to install it into a project using 15.11.0 I had to use the --legacy-peer-deps flag, which resulted in:

$ npm install --save @maps4html/web-map-custom-element --legacy-peer-deps
npm WARN deprecated deep-defaults@1.0.5: not actively maintained; find alternatives
npm WARN deprecated transformation-matrix-js@2.7.6: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.

@erictheise
Copy link
Member Author

In chat @prushforth notes "On my windows machine I have v13.13.0 and on wsl2 it is v15.11.0" and that "The LTS version available for windows 10 is 14.7.3 / npm 6.14.13".

I use nvm and note that 14.7.0 is what they have available. I'd be keen to commit an .nvmrc file containing either 15.11.0 or 14.7 but wonder what @Malvoz thinks about agreeing on a version to keep package-lock.json from flapping around too much.

@erictheise
Copy link
Member Author

Perhaps a bit too much to ask as part of this issue, but it'd be really neat if we - at some point - could serve assets over a CDN.

I think this is straightforward enough that we can piggyback it onto this issue.

@erictheise erictheise changed the title Lay groundwork for distribution via npm Lay groundwork for distribution via npm and a CDN Jul 23, 2021
@erictheise erictheise changed the title Lay groundwork for distribution via npm and a CDN Lay groundwork for distribution via npm and CDNs Jul 23, 2021
prushforth pushed a commit that referenced this issue Jul 23, 2021
#496)

* Addresses #493; adding scope allows publishing to npm

* typo fix.

* Addresses #493 by suggesting a node version.
erictheise added a commit that referenced this issue Jul 29, 2021
…ged; what's needed will be cherry-picked into master. Pushes release v0.8.2 to npm with proper structure for unpkg cdn distribution.
erictheise added a commit that referenced this issue Jul 29, 2021
…t duplicate package.json in /dist. Apologies for spurious whitespace changes, my IDE chomps trailing spaces on save.
erictheise added a commit that referenced this issue Jul 29, 2021
… updated with an Installation section for these additions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants