mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
Copy antipattern examples and browser detector to build output
These self-contained HTML files and the detector script were served by the dev server from public/ but never made it into the Cloudflare Pages build directory, causing 404s on the deployed site. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3769057e79
commit
eeee5bc0aa
@@ -570,6 +570,20 @@ async function build() {
|
||||
}
|
||||
}
|
||||
|
||||
// Copy antipattern examples (self-contained HTML, not Bun entrypoints)
|
||||
const examplesDir = path.join(ROOT_DIR, 'public', 'antipattern-examples');
|
||||
if (fs.existsSync(examplesDir)) {
|
||||
copyDirSync(examplesDir, path.join(buildDir, 'antipattern-examples'));
|
||||
}
|
||||
|
||||
// Copy browser detector script (referenced by antipattern examples at /js/...)
|
||||
const detectorSrc = path.join(ROOT_DIR, 'src', 'detect-antipatterns-browser.js');
|
||||
if (fs.existsSync(detectorSrc)) {
|
||||
const jsDir = path.join(buildDir, 'js');
|
||||
fs.mkdirSync(jsDir, { recursive: true });
|
||||
fs.copyFileSync(detectorSrc, path.join(jsDir, 'detect-antipatterns-browser.js'));
|
||||
}
|
||||
|
||||
// Read source files (unified skills architecture)
|
||||
const { skills } = readSourceFiles(ROOT_DIR);
|
||||
const patterns = readPatterns(ROOT_DIR);
|
||||
|
||||
Reference in New Issue
Block a user