forked from dahlia/logtape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnt.ts
52 lines (49 loc) · 1.28 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
50
51
52
import { build, emptyDir } from "@deno/dnt";
import metadata from "./deno.json" with { type: "json" };
await emptyDir("./npm");
await build({
package: {
name: "@logtape/logtape",
version: Deno.args[0] ?? metadata.version,
description: "Simple logging library with zero dependencies for " +
"Deno/Node.js/Bun/browsers",
keywords: ["logging", "log", "logger"],
license: "MIT",
author: {
name: "Hong Minhee",
email: "[email protected]",
url: "https://hongminhee.org/",
},
homepage: "https://github.com/dahlia/logtape",
repository: {
type: "git",
url: "git+https://github.com/dahlia/logtape.git",
},
bugs: {
url: "https://github.com/dahlia/logtape/issues",
},
},
outDir: "./npm",
entryPoints: ["./logtape/mod.ts"],
importMap: "./deno.json",
mappings: {
"./logtape/filesink.deno.ts": "./logtape/filesink.node.ts",
},
shims: {
deno: "dev",
custom: [
{
module: "node:stream/web",
globalNames: ["WritableStream"],
},
],
},
typeCheck: "both",
declaration: "separate",
declarationMap: true,
async postBuild() {
await Deno.copyFile("LICENSE", "npm/LICENSE");
await Deno.copyFile("README.md", "npm/README.md");
},
});
// cSpell: ignore Minhee filesink