mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 23:26:39 +03:00
Add .vuepress to the hidden source-dir allowlist
Cursor Bugbot correctly noted classic VuePress keeps theme layouts, components, and styles under .vuepress/, which the walker scanned before the hidden-dir rule. Same treatment as .vitepress and .storybook. Prepared with AI assistance (Claude Code), directed by @pbakaus. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
a1a6441ba1
commit
aeacf55074
@@ -18,9 +18,10 @@ const SKIP_DIRS = new Set([
|
||||
|
||||
// The exceptions to the hidden-dir rule: hidden directories that
|
||||
// conventionally hold real UI source rather than tooling or vendored code.
|
||||
// VitePress keeps custom theme components in .vitepress/theme/*.vue, and
|
||||
// Storybook keeps preview decorators/styles in .storybook/.
|
||||
const HIDDEN_SOURCE_DIRS = new Set(['.vitepress', '.storybook']);
|
||||
// VitePress and VuePress keep custom theme components in
|
||||
// .vitepress/theme/*.vue / .vuepress/theme/, and Storybook keeps preview
|
||||
// decorators/styles in .storybook/.
|
||||
const HIDDEN_SOURCE_DIRS = new Set(['.vitepress', '.vuepress', '.storybook']);
|
||||
|
||||
const SCANNABLE_EXTENSIONS = new Set([
|
||||
'.html', '.htm', '.css', '.scss', '.sass', '.less',
|
||||
|
||||
@@ -168,7 +168,7 @@ function isVendoredPath(rel) {
|
||||
const dirSegments = rel.split(/[\\/]/).slice(0, -1);
|
||||
return dirSegments.some(
|
||||
(seg) =>
|
||||
(seg.startsWith('.') && seg !== '.vitepress' && seg !== '.storybook') ||
|
||||
(seg.startsWith('.') && seg !== '.vitepress' && seg !== '.vuepress' && seg !== '.storybook') ||
|
||||
seg === 'node_modules' || seg === 'dist' || seg === 'build' || seg === '__pycache__',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1850,11 +1850,13 @@ describe('walkDir', () => {
|
||||
// exception: VitePress themes and Storybook preview files must keep
|
||||
// being scanned (they were before the hidden-dir rule existed).
|
||||
write('.vitepress/theme/Layout.vue');
|
||||
write('.vuepress/theme/Layout.vue');
|
||||
write('.storybook/preview.css');
|
||||
const files = walkDir(tmp).sort();
|
||||
expect(files).toEqual([
|
||||
path.join(tmp, '.storybook', 'preview.css'),
|
||||
path.join(tmp, '.vitepress', 'theme', 'Layout.vue'),
|
||||
path.join(tmp, '.vuepress', 'theme', 'Layout.vue'),
|
||||
path.join(tmp, 'src', 'app.css'),
|
||||
]);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user