-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild-npm.ts
36 lines (34 loc) · 1.08 KB
/
build-npm.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { build, emptyDir } from "jsr:@deno/dnt";
await emptyDir("./dist/npm");
await build({
entryPoints: ["./mod.ts"],
outDir: "./dist/npm",
shims: { deno: "dev" },
test: false,
typeCheck: "both",
package: {
name: "content-security-policy-builder",
author: "Evan Hahn <[email protected]> (https://evanhahn.com)",
description: "Build Content Security Policy directives.",
version: "2.3.0",
license: "MIT",
keywords: ["security", "content", "security", "policy", "csp", "builder"],
homepage: "https://github.com/helmetjs/content-security-policy-builder",
repository: {
type: "git",
url: "git://github.com/helmetjs/content-security-policy-builder.git",
},
bugs: {
url: "https://github.com/helmetjs/content-security-policy-builder/issues",
email: "[email protected]",
},
engines: {
node: ">=18.0.0",
},
},
postBuild() {
Deno.copyFileSync("LICENSE", "./dist/npm/LICENSE");
Deno.copyFileSync("README.md", "./dist/npm/README.md");
Deno.copyFileSync("CHANGELOG.md", "./dist/npm/CHANGELOG.md");
},
});