domutil/scripts/npm.ts
2024-10-12 23:08:35 +02:00

27 lines
620 B
TypeScript

import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
await emptyDir("./npm");
await build({
entryPoints: ["./domutil.ts"],
outDir: "./npm",
shims: {},
esModule: true,
compilerOptions: {
lib: ["ES2017", "DOM"],
},
package: {
name: "@hamcha/domutil",
version: Deno.args[0],
description: "Cursed DOM microlibrary",
license: "AGPL-3.0",
repository: {
type: "git",
url: "git+https://git.fromouter.space/Hamcha/domutil",
},
},
postBuild() {
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync(".npmrc", "npm/.npmrc");
},
});