nano-service/scripts/build_npm.ts
2024-01-04 21:20:47 +01:00

30 lines
625 B
TypeScript

import { build, emptyDir } from "dnt";
await emptyDir("./npm");
await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {
deno: true,
},
test: false,
importMap: "deno.json",
package: {
name: "nano-service",
version: Deno.args[0],
description: "Your package.",
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/username/repo.git",
},
bugs: {
url: "https://github.com/username/repo/issues",
},
},
postBuild() {
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
});