Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const SRC_DIR = join(__dirname, "src");
const BUILD_DIR = join(__dirname, "build");
const OUT_DIR = join(__dirname, "lib");

/**
Expand Down Expand Up @@ -95,7 +96,7 @@ const entryPointsPlugin = {

// Find the source files containing Action entry points.
build.onStart(() => {
const actionFiles = globSync("src/*-action{,-post}.ts");
const actionFiles = globSync(join(BUILD_DIR, "*-action{,-post}.js"));
for (const actionFile of actionFiles) {
const match = basename(actionFile).match(/(.*)-action(-post)?/);

Expand Down Expand Up @@ -137,7 +138,7 @@ const entryPointsPlugin = {
const imports = actionsSorted
.map(
(action) =>
`import * as ${action.pascalCaseName} from "./src/${basename(action.path)}";`,
`import * as ${action.pascalCaseName} from "./build/${basename(action.path)}";`,
)
.join("\n");
const wrappers = actionsSorted
Expand All @@ -153,7 +154,7 @@ const entryPointsPlugin = {
return {
contents: `"use strict";\n${imports}\n\n${uploadLibReExport}\n\n${wrappers}\n`,
resolveDir: ".",
loader: "ts",
loader: "js",
};
});

Expand Down
2 changes: 1 addition & 1 deletion lib/analyze-entry.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze-post-entry.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/autobuild-entry.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading