Skip to content

Commit

Permalink
Merge pull request #255 from ryoppippi/feature/fix-import-map
Browse files Browse the repository at this point in the history
feat: Move imports to separate import_map.json  && feat(build_npm.ts): add importMap to build script
  • Loading branch information
ryoppippi authored Apr 30, 2024
2 parents 324ddbe + 7620ba9 commit 6c34f40
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 40 deletions.
7 changes: 1 addition & 6 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
"repository": "ryoppippi/str-fns",
"license": "MIT",
"exports": "./src/index.ts",
"imports": {
"type-fest": "npm:[email protected]",
"assert": "jsr:@std/[email protected]",
"type-testing": "jsr:@std/[email protected]/types",
"@deno/dnt": "jsr:@deno/dnt@^0.41.1"
},
"importMap": "./import_map.json",
"tasks": {
"dev": "deno run --watch ./src/index.ts",
"check": "deno check ./**/*.ts",
Expand Down
35 changes: 1 addition & 34 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"imports": {
"type-fest": "npm:[email protected]",
"assert": "jsr:@std/[email protected]",
"type-testing": "jsr:@std/[email protected]/types",
"@deno/dnt": "jsr:@deno/dnt@^0.41.1"
}
}
1 change: 1 addition & 0 deletions scripts/build_npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ await build({
typeCheck: false,
test: false,
entryPoints: ["src/index.ts"],
importMap: "./import_map.json",
outDir: "./npm",
shims: {
deno: "dev",
Expand Down

0 comments on commit 6c34f40

Please sign in to comment.