importmap command
See original GitHub issueadd a importmap
command to manage the import_map.json
:
$ aleph importmap add @npm/react
-> 17.0.1
- 16.14.0
- 16.13.1
- other
$ aleph importmap add std/hash
$ aleph importmap add aleph
$ aleph importmap add aleph@1.0.0/mod.ts --name aleph
$ aleph importmap add aleph --cdn nest.land
$ aleph importmap add @npm/react@17.0.1 --cdn skypack
$ aleph importmap update
supported sources:
- npm packages via esm.sh
- deno.land/std
- deno.land/x
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Importmap for Rails
bin/importmap command that's added as part of the install to pin, unpin, or update npm packages in your import map. This command uses...
Read more >Import Maps Under the Hood in Rails 7
importmap is an executable file that loads a config/application.rb file from your project and the import maps commands file. Import maps use the ......
Read more >Importmaps
bin/importmap command that's added as part of the install to pin , unpin , or update npm packages in your import map. This...
Read more >How to use Import Maps in Rails 7 (with examples)
If you want to install a library using a JSPM CDN you simply need the pin command and the library name. Run: ./bin/importmap...
Read more >How to Dynamically Import JavaScript with Import Maps
The command will ask you if you want to install a package. ... An import map is a JavaScript object where the key...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Currently I have this implemented:
Supports esm.sh, deno.land/std/, and deno.land/x/ so far.
The command will query NPM and deno.land respectively to make sure the versions exist. It also queries deno.land to make sure the specific file/folder that is specified actually exists on that version.
I made some assumptions for deno.land module specifier resolution for now, it works like this:
Examples:
I probably made other assumptions but this is a good enough mvp for now. Feedback appreciated!
This could definitely become it’s own
/x/
package because of usefulness, but prob best to start off of small by keeping it here.