docs: conditional pre-commit
This commit is contained in:
parent
4001b175bd
commit
451b0829f2
|
|
@ -5,5 +5,14 @@ npx --no-install lint-staged
|
||||||
|
|
||||||
# Validate everything
|
# Validate everything
|
||||||
npm test
|
npm test
|
||||||
|
|
||||||
|
# Validate docs links only when docs change
|
||||||
|
if command -v rg >/dev/null 2>&1; then
|
||||||
|
if git diff --cached --name-only | rg -q '^docs/'; then
|
||||||
npm run docs:validate-links
|
npm run docs:validate-links
|
||||||
npm run docs:build
|
fi
|
||||||
|
else
|
||||||
|
if git diff --cached --name-only | grep -Eq '^docs/'; then
|
||||||
|
npm run docs:validate-links
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
npm run docs:validate-links
|
|
||||||
npm run docs:build
|
|
||||||
|
|
@ -24,8 +24,8 @@ const BUILD_DIR = path.join(PROJECT_ROOT, 'build');
|
||||||
const SITE_URL = process.env.SITE_URL || 'https://bmad-code-org.github.io/BMAD-METHOD';
|
const SITE_URL = process.env.SITE_URL || 'https://bmad-code-org.github.io/BMAD-METHOD';
|
||||||
const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD';
|
const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD';
|
||||||
|
|
||||||
const LLM_MAX_CHARS = 800_000;
|
const LLM_MAX_CHARS = 700_000;
|
||||||
const LLM_WARN_CHARS = 700_000;
|
const LLM_WARN_CHARS = 600_000;
|
||||||
|
|
||||||
const LLM_EXCLUDE_PATTERNS = ['changelog', 'ide-info/', 'v4-to-v6-upgrade', 'downloads/', 'faq'];
|
const LLM_EXCLUDE_PATTERNS = ['changelog', 'ide-info/', 'v4-to-v6-upgrade', 'downloads/', 'faq'];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue