refactor: move canvas asset build into plugin

This commit is contained in:
Peter Steinberger
2026-05-06 23:09:50 +01:00
parent b76291450b
commit 9dbb54ebd4
26 changed files with 634 additions and 349 deletions

View File

@@ -22,14 +22,14 @@ if (mode !== "lint" && mode !== "format") {
const lintExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"]);
const formatExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".md", ".mdx"]);
const formatIgnoredPaths = new Set(["extensions/canvas/src/host/a2ui/a2ui.bundle.js"]);
const formatIgnoredPathPatterns = [/^extensions\/[^/]+\/src\/host\/.+\/[^/]+\.bundle\.js$/u];
const shouldSelect = (filePath) => {
const ext = path.extname(filePath).toLowerCase();
if (mode === "lint") {
return lintExts.has(ext);
}
if (formatIgnoredPaths.has(filePath)) {
if (formatIgnoredPathPatterns.some((pattern) => pattern.test(filePath))) {
return false;
}
return formatExts.has(ext);