-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnt.ts
41 lines (37 loc) · 872 Bytes
/
dnt.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
37
38
39
40
41
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
const version = Deno.args[0];
if (!version) {
console.error("Version not provided.");
Deno.exit(1);
}
const entryPoint = Deno.args[1];
if (!entryPoint) {
console.error("Entry point not provided.");
Deno.exit(1);
}
await emptyDir("./dist");
await build({
entryPoints: [entryPoint],
outDir: "./dist",
typeCheck: "both",
test: false,
shims: {},
compilerOptions: {
lib: ["ESNext", "DOM"],
},
packageManager: "pnpm",
package: {
name: "safeson-js",
version,
description: "A JSON-compatible serialization format",
author: "Roj <[email protected]>",
license: "AGPL-3.0-or-later",
repository: {
type: "git",
url: "git+https://github.com/roj1512/SafeSON.git",
},
},
postBuild() {
Deno.copyFileSync("LICENSE", "dist/LICENSE");
},
});