-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support publishing to registry with an importmap #3
Comments
Does this mean that every Corner caseSuppose me creating something like framework that is going to have a project init script. This script is going to copy some This means that in that particular case only a subset of |
Would it rather make sense to provide an unfurling script? |
@aapoalas Yes, I think ideally it would be a separate script that runs as part of a GitHub action step. This allows people to give the registry the exact code they want it to serve.
@albnnc normally for project init scripts people don't copy over straight files, but instead things are generated because there will be some conditionals. So generally, people would do a straight copy of a file to another file. That said, there would be ways around this such as using the github action with this setting turned off, saving the template file with another extension, or using different import map entries in the module compared to the user's import map. |
I'm wondering if the solution here may also apply to the following: Let's say that a given lib contains an It would be nice for potential users to be able to interact with this example without needing to clone the project. Aka. deno run -A https://deno.land/x/<the-project>/examples/a.ts If, however, deno run -A https://deno.land/x/<the-project>/examples/a.ts \
--import-map=https://deno.land/x/<the-project>/import_map.json This is unfortunate. Any ideas on how to enable the first, simpler example run command? |
Good idea. |
No longer relevant with the release of https://jsr.io This now happens automatically on |
It might be useful for people to publish to the registry with the import map unfurled.
For example, say the module has an import map like so:
And a TypeScript file like so:
The user would be able to somehow specify "here's the import map to use for my module" to the registry (edit: nowadays, probably automatically resolved from deno.json/jsonc or perhaps this could be a GH action build step) and it would be published to the registry as:
The text was updated successfully, but these errors were encountered: