Skip to content

Commit 6c34f40

Browse files
authored
Merge pull request #255 from ryoppippi/feature/fix-import-map
feat: Move imports to separate import_map.json && feat(build_npm.ts): add importMap to build script
2 parents 324ddbe + 7620ba9 commit 6c34f40

File tree

4 files changed

+11
-40
lines changed

4 files changed

+11
-40
lines changed

deno.jsonc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
"repository": "ryoppippi/str-fns",
66
"license": "MIT",
77
"exports": "./src/index.ts",
8-
"imports": {
9-
"type-fest": "npm:type-fest@4.15.0",
10-
"assert": "jsr:@std/assert@0.222.1",
11-
"type-testing": "jsr:@std/testing@0.222.1/types",
12-
"@deno/dnt": "jsr:@deno/dnt@^0.41.1"
13-
},
8+
"importMap": "./import_map.json",
149
"tasks": {
1510
"dev": "deno run --watch ./src/index.ts",
1611
"check": "deno check ./**/*.ts",

deno.lock

Lines changed: 1 addition & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

import_map.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"imports": {
3+
"type-fest": "npm:type-fest@4.15.0",
4+
"assert": "jsr:@std/assert@0.222.1",
5+
"type-testing": "jsr:@std/testing@0.222.1/types",
6+
"@deno/dnt": "jsr:@deno/dnt@^0.41.1"
7+
}
8+
}

scripts/build_npm.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ await build({
1515
typeCheck: false,
1616
test: false,
1717
entryPoints: ["src/index.ts"],
18+
importMap: "./import_map.json",
1819
outDir: "./npm",
1920
shims: {
2021
deno: "dev",

0 commit comments

Comments
 (0)