-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.ts
51 lines (46 loc) · 1.11 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
import { build, emptyDir } from "jsr:@deno/dnt@0.41.3";
import * as esbuild from "npm:esbuild@0.24.2";
console.debug("Start dnt ...");
const outDir = "./npm";
await emptyDir(outDir);
await build({
entryPoints: ["./src/main.ts", "./src/post.ts"],
outDir,
typeCheck: false,
test: false,
declaration: false,
esModule: false,
shims: {
deno: true,
},
package: {
// Dummy package.json
name: "@kesin11/actions-timeline",
version: "0.1.0",
description:
"An Action shows timeline of a GitHub Action workflow in the run summary page.",
license: "MIT",
repository: {
type: "git",
url: "https://github.com/Kesin11/actions-timeline.git",
},
bugs: {
url: "https://github.com/Kesin11/actions-timeline/issues",
},
},
});
console.log("Start esbuild ...");
const distDir = "./dist";
await emptyDir(distDir);
await esbuild.build({
entryPoints: ["./npm/src/main.ts", "./npm/src/post.ts"],
outdir: distDir,
bundle: true,
platform: "node",
target: "node20",
format: "cjs",
minify: false,
sourcemap: false,
}).finally(() => {
});
console.log("Complete!");