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

Get Denoland module to work #1504

Open
twiss opened this issue Mar 2, 2022 · 3 comments
Open

Get Denoland module to work #1504

twiss opened this issue Mar 2, 2022 · 3 comments

Comments

@twiss
Copy link
Member

twiss commented Mar 2, 2022

As per the suggestion here, I went through the instructions to publish deno.land/x/openpgp, without fully thinking through what would happen, but of course it doesn't work, since it just takes the source code from GitHub, which has imports from Node modules etc, which don't work in Deno. We could change the way we import modules, but that would require a major overhaul also to the way we build for Node. What we really want is to publish the built module (i.e. the result of npm run prepare/build) to Denoland. (We used to publish the built module to GitHub, but I would really prefer not to go back to that.) @Hexagon, or anyone else from the Deno community, do you know how to do so, or have other thoughts on the matter?

@Hexagon
Copy link
Contributor

Hexagon commented Mar 2, 2022

Great that you're working in this!

I commit dist/ to github on my own libs to get all cdn services (including deno.land/x) to play nicely. So i have no experience from this problem myself.

I have however reached out to the Deno community, to see if they have any pointers. Let's hope they have :)

@Hexagon
Copy link
Contributor

Hexagon commented Apr 20, 2022

Not much response from the Deno community. But i guess you could just add a note on Deno installation similar to the one under the browser section.

"Deno (plain files)
Grab openpgp.mjs from unpkg.com/openpgp/dist, and import it locally"

It will be fully usable, just not served from deno.land/x for now.

It would also be possible to import directly from unpkg or https://www.jsdelivr.com/package/npm/openpgp if you want to recommend any of those alternatives

@phorcys420
Copy link

I was able to import using the Skypack CDN incase anyone wants to use a workaround for the time being.

import * as openpgp from "https://cdn.skypack.dev/openpgp";

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

3 participants