Open KnorpelSenf opened 3 years ago
We actually do have a build process on Skypack. However it doesn't use deno bundle. Does that matter?
No, that does not matter (to me).
Can you provide a reference to the docs for how to use deno.land/x
modules in the browser, or an example code snippet?
No, we do not support registries outside of npm at this time. We have talked about having other registries and if we add support for that then deno.land seems like a natural one to add.
I see. I was initially thinking about a separate service that is dedicated to bundle Deno modules instead of Node modules. It would not need to support anything but deno bundle
, so I assume it is a really straightforward thing to implement. It would then automatically be able to support any service that hosts Deno code.
However, you may be right that it makes sense to reuse the existing infra, make it able to parse explicit file extensions, and permit further hosts. I am not familiar enough with your architecture to say what is the better way, I am just looking for a way to <script>
tag include deno modules in a website.
This could not work with deno bundle
, as it is meant to output code targeting Deno.
A small ~30 lines script would need to be written that can leverage Deno.emit
in order to bundle the code. However, the general idea remains the same.
Skypack is mainly a CDN to get npm modules to work without build process, also in Deno. This helps foster the Deno ecosystem and increase adoption.
However, suppose I have a native Deno module, I cannot use it on the web without using a build process. (I cannot import TypeScript files from
deno.land
.) This is basically the exact same problem as with node modules on the web.I suggest wrapping the
deno bundle
command and integrating it into your infrastructure. This would allow toAre you interested in this idea? If not, please let me know so I can begin my own project.