-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnt.ts
49 lines (47 loc) · 1.18 KB
/
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
42
43
44
45
46
47
48
49
// Bundle src/mod.ts into both ESM and CJS format.
import { build } from "jsr:@deno/dnt@^0.41.1";
import pkg from "./deno.json" with { type: "json" };
await Deno.remove("./dnt", { recursive: true }).catch(() => {});
await build({
entryPoints: ["./mod.ts"],
outDir: "./dnt",
shims: {
deno: false,
},
package: {
// package.json properties
name: "multidict",
version: pkg.version,
description: pkg.description,
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/vicary/multidict.git",
},
bugs: {
url: "https://github.com/vicary/multidict/issues",
},
keywords: [
"dictionary",
"map",
"object map",
"array map",
"graph",
"two-way association",
"bidirectional mapping",
"many to many relationship",
"multiple keys",
"multiple values",
],
funding: {
type: "github",
url: "https://github.com/sponsors/vicary",
},
},
async postBuild() {
// steps to run after building and before running the tests
await Deno.copyFile("LICENSE", "dnt/LICENSE");
await Deno.copyFile("README.md", "dnt/README.md");
},
typeCheck: "both",
});