Replies: 1 comment 3 replies
-
I found details on the format here:
Example request: https://api.jspm.io/generate?install=lume Play with it live here: https://hopp.sh/r/1jvo7XXmC8gM It accepts the following parameters (not sure this is correct):
const response = await fetch('https://api.jspm.io/generate?install=lume')
const info = await response.json()
console.log(info.map) // the importmap The response takes about 2 seconds for me every time though. It is not cached. Is there a way to cache it? Maybe by providing a cache key parameter or something? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am desiring to make concise for easy pasting to get libraries "installed" for build-less users. The import maps generated by the generator work, but they can be a lot of noisy code.
I'd like to have this instead:
and it will sync XHR the importmap from JSPM, then
document.write
it, to keep the code short.I can implement this, but I don't know what the format is for https://api.jspm.io/generate. Can you briefly summarize the URL format(s)?
Beta Was this translation helpful? Give feedback.
All reactions