Deno module linker
dlink
is designed to manage URL module specifiers for
Deno.
Managing URL module specifier in Deno is qutie hard. dlink is designed to resolve these problems by familiar way for developers.
$ deno install --allow-write --allow-read --allow-net https://deno.land/x/dlink/dlink.ts
with install directory:
$ deno install --allow-write --allow-read --allow-net --root /usr/local https://deno.land/x/dlink/dlink.ts
$ cd ./project
$ dlink
{
"https://deno.land/std": {
"version": "@v0.32.0",
"modules": ["/fs/mod.ts", "/fs/path.ts", "/flags/mod.ts"]
}
}
$ dlink
Linked: https://deno.land/std@v0.32.0/fs/mod.ts -> ./vendor/https/deno.land/std/fs/mod.ts
Linked: https://deno.land/std@v0.32.0/fs/path.ts -> ./vendor/https/deno.land/std/fs/path.ts
Linked: https://deno.land/std@v0.32.0/flags/mod.ts -> ./vendor/https/deno.land/std/flags/mod.ts
dlink will automatically create module asias files that are described in
modules.json
. If there are modules.json
like below:
{
":moduleId": {
"version": ":version",
"modules": [":moduleFile"]
}
}
- Alias for
":modileFile"
will be created at:./vendor/{:moduleId}/{:moduleFile}
- Aalis is contains:
export * from "{:moduleId}{:version}{:moduleFile}"
import * fs from "./vendor/https/deno.land/std/fs/mod.ts"
MIT