mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-15 07:36:50 +03:00
sourceFiles walks assets/: a stylesheet there may be the one reference to a plate
Greptile P1 on #599: unreferencedPlates read a plate referenced only from assets/hero.css as unused and the hero gate refused a valid build. The extension filter already keeps binaries out of the walk. AI-assisted (Claude Code).
This commit is contained in:
@@ -318,7 +318,10 @@ export function gatePlates(state, { specPath = SPEC_PATH } = {}) {
|
||||
/** Source files that could reference a plate: bounded walk, skipping deps and build output. */
|
||||
function sourceFiles(root = '.', limit = 400) {
|
||||
const out = [];
|
||||
const skip = new Set(['node_modules', '.git', 'dist', 'build', 'out', '.next', '.svelte-kit', '.impeccable', 'assets', 'coverage']);
|
||||
// `assets` is walked: the extension filter already keeps binaries out, and
|
||||
// a stylesheet at assets/hero.css may be the one file that references a
|
||||
// plate (Greptile P1 on #599: the gate refused a valid build for it).
|
||||
const skip = new Set(['node_modules', '.git', 'dist', 'build', 'out', '.next', '.svelte-kit', '.impeccable', 'coverage']);
|
||||
const exts = /\.(html?|css|scss|jsx?|tsx?|svelte|vue|astro|mdx?|php|erb|hbs)$/i;
|
||||
const walk = (dir, depth) => {
|
||||
if (out.length >= limit || depth > 6) return;
|
||||
|
||||
Reference in New Issue
Block a user