Skip to content

Commit 410675d

Browse files
committed
✨ convert inline URL imports to bare specifiers
Added import map to deno.json for all URL dependencies and updated all files to use bare specifiers instead of inline URLs. Fixes no-import-prefix lint errors.
1 parent e262cb7 commit 410675d

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

deno.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
2+
"imports": {
3+
"alea": "https://esm.sh/alea@1.0.1?pin=v132",
4+
"seed": "https://deno.land/x/seed@1.0.0/index.ts",
5+
"dnt": "https://deno.land/x/dnt@0.28.0/mod.ts",
6+
"gaussian": "https://deno.land/x/gaussian@v0.1.0/mod.ts",
7+
"@std/fs": "jsr:@std/fs@^1.0.8",
8+
"@std/assert": "jsr:@std/assert@^1.0.8"
9+
},
210
"tasks": {
311
"test": "deno test",
412
"build:npm": "deno run -A tasks/build-npm.ts",

fix-static-css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* from a working page and injects them into all broken pages.
99
*/
1010

11-
import { walk } from "https://deno.land/std@0.208.0/fs/walk.ts";
11+
import { walk } from "@std/fs/walk";
1212

1313
const builtDir = "built";
1414

src/deps.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export * as graphql from "https://esm.sh/graphql@16.6.0?pin=v132";
22
export * from "https://deno.land/x/continuation@0.1.0/mod.ts";
3-
export * from "https://deno.land/x/seed@1.0.0/index.ts";
4-
export { assert } from "https://deno.land/std@0.145.0/testing/asserts.ts";
3+
export * from "seed";
4+
export { assert } from "@std/assert";
55
export { default as globToRegExp } from "https://esm.sh/glob-to-regexp@0.4.1?pin=v132";
66
export { default as hash } from "https://esm.sh/hash.js@1.1.7?pin=v132";
77

8-
import * as alea from "https://esm.sh/alea@1.0.1?pin=v132";
8+
import * as alea from "alea";
99
export const Alea = alea.default;

src/distribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gaussian } from "https://deno.land/x/gaussian@v0.1.0/mod.ts";
1+
import { gaussian } from "gaussian";
22

33
export interface Distribution<T> {
44
description: string;

src/graph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// deno-lint-ignore-file no-explicit-any
2-
import { assert } from "https://deno.land/std@0.140.0/testing/asserts.ts";
2+
import { assert } from "@std/assert";
33

44
import {
55
constant,

src/seedrandom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Seed } from "https://deno.land/x/seed@1.0.0/index.ts";
1+
import { Seed } from "seed";
22

33
export function seedrandom(key?: string) {
44
let seed = new Seed(key);

tasks/build-npm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { build, emptyDir } from "https://deno.land/x/dnt@0.28.0/mod.ts";
1+
import { build, emptyDir } from "dnt";
22

33
const outDir = "./build/npm";
44

0 commit comments

Comments
 (0)