-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild-npm.ts
35 lines (33 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
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
await emptyDir("./dist/npm");
await build({
entryPoints: ["./mod.ts"],
outDir: "./dist/npm",
shims: { deno: "dev" },
typeCheck: "both",
package: {
name: "content-security-policy-parser",
author: "Evan Hahn <[email protected]> (https://evanhahn.com)",
description: "Parse Content Security Policy directives.",
version: "0.6.0",
license: "MIT",
keywords: ["security", "content", "security", "policy", "csp", "parser"],
homepage: "https://github.com/helmetjs/content-security-policy-parser",
repository: {
type: "git",
url: "git://github.com/helmetjs/content-security-policy-parser.git",
},
bugs: {
url: "https://github.com/helmetjs/content-security-policy-parser/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");
},
});