- Notifications
You must be signed in to change notification settings - Fork2
denofn/dreg
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
https://cdn.dreg.dev/package/PACKAGENAME@VERSION
A safe registry for importing NPM packages in Deno as ES Modules.
This project spawned as a necessary tool fordenopack to use predefined Rollup plugins. The goal is to be as generic as possible and to only use a target like jspm/skypack with transpile cjs bundles when it's absolutely necessary. Primary target for proxying is jsdelivr, with automatic rewrites happening in the runtime.
This registry follows the same principles as deno.land/x and nest.land - only versioned packages are allowed. You can check available packages inregistry.json.
The analyzer currently creates the registry entries forregistry.json
. The best way to use it currently would be to clone the project and - assuming you're using Velociraptor - runvr analyzer -d <packageName>
.
Available flags:
-d <name>
: package name-v <version>
: predefined version to check. Not using this flag means analyzer will check the latest available version.--doSanityCheck
: spot potential compiler errors--persist
: writes toregistry.json
. Runvr generate
afterwards to persist inregistry.ts
as well
The backbone for the CDN. Code is loaded and rewritten ad-hoc thanks to the registry.
Failures on loading dependencies from dreg can sometimes be resolved with running--no-check
the first time a package is loaded. This is a known issue that has been logged on Deno's Github page:denoland/deno#7145
- The brick emoji is courtesy ofTwemoji