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

create ready to use bundle #17

Closed
quarkus opened this issue Aug 28, 2020 · 6 comments · Fixed by #25
Closed

create ready to use bundle #17

quarkus opened this issue Aug 28, 2020 · 6 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request

Comments

@quarkus
Copy link
Contributor

quarkus commented Aug 28, 2020

I would like to be able to use element-js via cdn (unpkg i.E.) for rapid prototyping.

@quarkus quarkus self-assigned this Sep 14, 2020
@quarkus quarkus added the enhancement New feature or request label Sep 14, 2020
@eddyloewen
Copy link
Contributor

This is not as easy as I thought...

All the known CDNs only serve from the normal npm registry and don't have a mechanism to change the registry. Since we are hosting our packages on the https://npm.pkg.github.com/ registry we currently cannot simply use those tools.

I have requested feedback for unpkg and jsdelivr:

mjackson/unpkg#277
jsdelivr/jsdelivr#18261

another option could be to host unpkg ourselfs (mjackson/unpkg#216) - but I'd rather not..

@eddyloewen
Copy link
Contributor

A solution that we could use for the time being is manually generating the /dist folder locally and pushing it up. If the /dist folder was inside the git repository we could fetch the files via jsDelivr like so:
https://cdn.jsdelivr.net/gh/webtides/[email protected]/src/

But I'm pretty sure that this would be quite error-prone...

@eddyloewen
Copy link
Contributor

As mentioned in the comment above, I have a "solution" in https://github.com/webtides/element-js/compare/feature/dist-bundle

The GitHub action will run the "npm run build" script and push it back to the main branch. With this in place we would be able to read the /dist bundles via https://cdn.jsdelivr.net/gh/webtides/[email protected]/dist/

The only problem with this is that we will only be able to read from @latest and not from specific tags. This is because the action will always run after the tagged commit...

But it would work in theory! See: https://codepen.io/eddyloewen/full/abZdNaj

@MartinKolarik
Copy link

The GitHub action will run the "npm run build" script and push it back to the main branch. With this in place we would be able to read the /dist bundles via https://cdn.jsdelivr.net/gh/webtides/[email protected]/dist/

If you go this way, I recommend tagging sources as v0.4.0-source on the main branch and then pushing dist to a separate branch, and tagging that as v0.4.0.

@eddyloewen
Copy link
Contributor

If you go this way, I recommend tagging sources as v0.4.0-source on the main branch and then pushing dist to a separate branch, and tagging that as v0.4.0.

Yeah! That is a good idea 👍 But I think I would then prefer to not use the GitHub package registry and instead use the NPM registry.

@MartinKolarik
Copy link

But I think I would then prefer to not use the GitHub package registry and instead use the NPM registry.

Yes, that sounds better.

@eddyloewen eddyloewen assigned eddyloewen and unassigned quarkus Mar 8, 2021
@eddyloewen eddyloewen linked a pull request Mar 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants