diff --git a/.gitignore b/.gitignore index 1750418..af947e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ _bin _site _cache -npm +_npm demo diff --git a/scripts/build_npm.ts b/_scripts/build_npm.ts similarity index 85% rename from scripts/build_npm.ts rename to _scripts/build_npm.ts index 46c1d49..e83a8c2 100644 --- a/scripts/build_npm.ts +++ b/_scripts/build_npm.ts @@ -1,7 +1,7 @@ import { build } from "jsr:@deno/dnt@0.41.2"; import { emptyDir } from "jsr:@std/fs@0.229.2/empty-dir"; -await emptyDir("./npm"); +await emptyDir("./_npm"); const version = Deno.args[0]?.replace(/^v/, ""); @@ -18,7 +18,7 @@ await build({ "./plugins/auto_trim.ts", ], scriptModule: false, - outDir: "./npm", + outDir: "./_npm", shims: { deno: true }, compilerOptions: { target: "ES2022" }, typeCheck: "both", @@ -38,7 +38,7 @@ await build({ "npm:@types/estree@1.0.5": "estree", }, postBuild() { - Deno.copyFileSync("LICENSE", "npm/LICENSE"); - Deno.copyFileSync("README.md", "npm/README.md"); + Deno.copyFileSync("LICENSE", "_npm/LICENSE"); + Deno.copyFileSync("README.md", "_npm/README.md"); }, }); diff --git a/deno.json b/deno.json index f5f5a36..92f175b 100644 --- a/deno.json +++ b/deno.json @@ -3,7 +3,7 @@ "test": "deno test --allow-read test", "bench": "deno bench --allow-read", "docs": "cd docs && deno task serve", - "build": "deno run --allow-run=npm --allow-env --allow-sys --allow-read --allow-write --allow-net=jsr.io scripts/build_npm.ts", + "build": "deno run --allow-run=npm --allow-env --allow-sys --allow-read --allow-write --allow-net=jsr.io _scripts/build_npm.ts", "update-deps": "rm -rf npm && deno run -A 'https://deno.land/x/nudd@v0.2.4/cli.ts' update deno.json **/*.ts" }, "lock": false,