nano-service/scripts/build_npm.ts
2024-01-04 21:33:53 +01:00

27 lines
573 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: "@qpismont/nano-service",
version: Deno.args[0],
description: "Your package.",
license: "MIT",
repository: {
"type": "git",
"url": "https://gitea.qpismont.fr/qpismont/nano-service",
},
},
postBuild() {
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");
},
});