Skip to content
🦕Deno module linker 🔗
TypeScript Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
fixtures
vendor/https/deno.land/std
.denov
.editorconfig
.gitignore
LICENSE
Makefile
README.md
main.ts
main_test.ts
modules-lock.json
modules.json

README.md

dink

Build Status https://img.shields.io/github/tag/keroxp/dink.svg license

Deno module linker

Concept

dink is designed to manage URL module specifiers for Deno.

Managing URL module specifier in Deno is qutie hard. dink is designed to resolve these problems by familiar way for developers.

Install

$ deno install dink https://denopkg.com/keroxp/dink/main.ts --allow-write --allow-read --allow-net

Usage

1. Create modules.json file

{
  "https://deno.land/std": {
    "version": "@v0.17.0",
    "modules": ["/fs/mod.ts", "/fs/path.ts", "/flags/mod.ts"]
  }
}

2. Run dink command

$ dink
Linked: https://deno.land/std@v0.17.0/fs/mod.ts -> ./vendor/https/deno.land/std/fs/mod.ts
Linked: https://deno.land/std@v0.17.0/fs/path.ts -> ./vendor/https/deno.land/std/fs/path.ts
Linked: https://deno.land/std@v0.17.0/flags/mod.ts -> ./vendor/https/deno.land/std/flags/mod.ts

dink 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}"

3. Import module aliases

import * fs from "./vendor/https/deno.land/std/fs/mod.ts"

Prior works

LICENSE

MIT

You can’t perform that action at this time.