Skip to content

Commit

Permalink
chore: use jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Oct 14, 2024
1 parent a92f724 commit 50c0547
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 111 deletions.
253 changes: 159 additions & 94 deletions deno.lock

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

20 changes: 6 additions & 14 deletions scripts/npm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ex. scripts/build_npm.ts
import { build, emptyDir } from "https://deno.land/x/dnt@0.33.1/mod.ts";
import { build, emptyDir } from "jsr:@deno/dnt";

await emptyDir("./npm");

Expand Down Expand Up @@ -37,14 +37,13 @@ await build({
],
outDir: "./npm",
shims: {
// see JS docs for overview and more options
deno: false,
},
packageManager: "npm",
test: false,
typeCheck: false,
compilerOptions: {
lib: ["es2022", "dom"],
lib: ["ES2022"],
},
package: {
// package.json properties
Expand All @@ -69,16 +68,9 @@ await build({
bugs: {
url: "https://github.com/vixalien/muse/issues",
},
files: [
"/esm",
"/script",
"/types",
"LICENSE",
"README.md",
],
},
postBuild() {
Deno.copyFileSync("LICENCE", "npm/LICENCE");
Deno.copyFileSync("README.md", "npm/README.md");
},
});

// post build steps
Deno.copyFileSync("LICENCE", "npm/LICENCE");
Deno.copyFileSync("README.md", "npm/README.md");
6 changes: 3 additions & 3 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { JSONPath, type JSONPathOptions } from "https://esm.sh/jsonpath-plus@10.0.0";
export { omit } from "https://esm.sh/lodash-es@4.17.21";
export { basename, extname } from "https://deno.land/std@0.221.0/path/mod.ts";
export { JSONPath, type JSONPathOptions } from "npm:jsonpath-plus@10.0.0";
export { omit } from "npm:lodash-es@4.17.21";
export { basename, extname } from "jsr:@std/path";

0 comments on commit 50c0547

Please sign in to comment.