Skip to content

Commit 3e725de

Browse files
committed
Copy defaults.json to lib
1 parent f04e228 commit 3e725de

14 files changed

+1275
-49
lines changed

build.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { rm } from "node:fs/promises";
2-
import { dirname, join } from "node:path";
2+
import path, { dirname, join } from "node:path";
33
import { fileURLToPath } from "node:url";
44

55
import * as esbuild from "esbuild";
66
import { globSync } from "glob";
7+
import { copy } from "esbuild-plugin-copy";
78
import { typecheckPlugin } from "@jgoz/esbuild-plugin-typecheck";
89

910
const __filename = fileURLToPath(import.meta.url);
@@ -25,13 +26,20 @@ const onEndPlugin = {
2526
},
2627
};
2728

29+
const copyDefaults = copy({
30+
assets: {
31+
from: ["src/defaults.json"],
32+
to: ["defaults.json"],
33+
},
34+
});
35+
2836
const context = await esbuild.context({
2937
entryPoints: globSync(["src/*-action.ts", "src/*-action-post.ts"]),
3038
bundle: true,
3139
format: "cjs",
3240
outdir: OUT_DIR,
3341
platform: "node",
34-
plugins: [typecheckPlugin(), onEndPlugin],
42+
plugins: [typecheckPlugin(), copyDefaults, onEndPlugin],
3543
});
3644

3745
await context.rebuild();

lib/analyze-action-post.js

Lines changed: 117 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js

Lines changed: 117 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)