-
Notifications
You must be signed in to change notification settings - Fork 3
/
_build.ts
61 lines (56 loc) · 1.41 KB
/
_build.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
import {
build,
emptyDir,
} from "https://raw.githubusercontent.com/denoland/dnt/0.30.0/mod.ts";
import packageJson from "./package.json" assert { type: "json" };
await emptyDir("npm");
packageJson.version = Deno.args[0];
await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
typeCheck: false,
test: false,
declaration: true,
scriptModule: "cjs",
compilerOptions: {
target: "Latest",
sourceMap: true,
inlineSources: true,
},
mappings: {
"https://raw.githubusercontent.com/esbuild/deno-esbuild/main/mod.d.ts": {
name: "esbuild",
version: "^0.15.12",
peerDependency: true,
},
"https://cdn.skypack.dev/html-minifier?dts": {
name: "html-minifier",
version: "^4.0.0",
peerDependency: true,
},
"https://cdn.skypack.dev/svgo?dts": {
name: "svgo",
version: "^3.0.0",
peerDependency: true,
},
"https://cdn.skypack.dev/txml?dts": {
name: "txml",
version: "^5.1.1",
peerDependency: true,
},
"https://raw.githubusercontent.com/TobiasNickel/tXml/master/tXml.d.ts": {
name: "txml",
version: "^5.1.1",
subPath: "tXml.d.ts",
peerDependency: true,
},
},
shims: {
deno: false,
timers: false,
},
package: packageJson,
});
Deno.copyFileSync("modules.d.ts", "npm/modules.d.ts");
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");