-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnt.ts
62 lines (59 loc) · 1.52 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
53
54
55
56
57
58
59
60
61
62
import { build, emptyDir } from "@deno/dnt";
await emptyDir("./npm");
await emptyDir("test/runtimes/browsers/node_modules");
await emptyDir("test/runtimes/bun/node_modules");
await emptyDir("test/runtimes/cloudflare/node_modules");
await emptyDir("test/runtimes/fastly/node_modules");
await emptyDir("samples/bun/node_modules");
await emptyDir("samples/cloudflare/node_modules");
await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
typeCheck: "both",
test: true,
declaration: "inline",
scriptModule: "umd",
importMap: "./deno.json",
compilerOptions: {
target: "ES2022",
lib: ["ES2023", "DOM"],
},
shims: {
deno: "dev",
},
package: {
name: "bhttp-js",
version: Deno.args[0],
description:
"A BHTTP (Binary Representation of HTTP Messages) Encoder and Decoder",
repository: {
type: "git",
url: "git+https://github.com/dajiaji/bhttp-js.git",
},
homepage: "https://github.com/dajiaji/bhttp-js#readme",
license: "MIT",
main: "./script/mod.js",
types: "./types/mod.d.ts",
exports: {
".": {
"import": "./esm/mod.js",
"require": "./script/mod.js",
},
"./package.json": "./package.json",
},
keywords: [
"bhttp",
"rfc9292",
],
engines: {
"node": ">=16.0.0",
},
author: "Ajitomi Daisuke",
bugs: {
url: "https://github.com/dajiaji/bhttp-js/issues",
},
},
});
// post build steps
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");