Skip to main content
Deno 2 is finally here 🎉️
Learn more

deliver_importmaps

pipeline status

This is a tool for generating an import map for loading JavaScript modules straight from the source inside of npm packages, delivered by the jsDelivr CDN.

Installation

To install, run:

deno install --allow-net=data.jsdelivr.com,cdn.jsdelivr.net \
  https://deno.land/x/deliver_importmaps/0.0.1/main.ts

This will install it as deliver_importmaps.

Running

To run, create a Markdown file with a code block in it that has a list of packages and version numbers in a code block called dependencies.json and pipe it into the command:

cat input.md | deliver_importmaps

The output will contain a code block that has an import map and another with the types for creating a file. They can be put into files using md_unpack_simple:

cat input.md | deliver_importmaps | md_unpack_simple

Source

This is generated from a markdown document, deliver_importmaps.md, using md_unpack_simple.

License

MIT