mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
refactor(theming): re-apply theme validator suite after parallel rebase
The plan-doc commits129971ffc+9db044178dropped the audit-theme-tokens → validate-theme-variables rename, the validate-theme-tokens → validate-theme-utilities rename, the new validate-theme-parity script, brand-literals.md, and the corresponding package.json + lint-staged.config.js + themes.css wiring. The files still existed on disk (git mv changes survived) but were untracked. Restore the validator suite so `pnpm run validate:all` works again: - validate:theme-variables (CSS var names: --muted → --color-muted) - validate:theme-utilities (Tailwind: no white/N, no neutral palette) - validate:theme-parity (every --color-* in :root ⇔ .dark + each [data-theme="..."]) All three wired into validate:all and lint-staged. `pnpm run validate:all` is clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
766ad2ea8f
commit
430aa30cbf
7 changed files with 411 additions and 17 deletions
|
|
@ -4,11 +4,18 @@ export default {
|
|||
'prettier --config .prettierrc.json --write',
|
||||
],
|
||||
'*.{json,md,svelte,astro}': ['prettier --config .prettierrc.json --write'],
|
||||
// Theme-token audit whenever styles-bearing files change. Runs on the
|
||||
// whole tree (ignores staged filenames), scans ~3k files in <1s, and
|
||||
// fails if any file re-introduces bare --muted / --theme-* references
|
||||
// instead of Mana's canonical --color-* tokens.
|
||||
'*.{svelte,css}': () => 'node scripts/audit-theme-tokens.mjs',
|
||||
// Theme-variable + utility audit whenever styles-bearing files change.
|
||||
// Runs on the whole tree (ignores staged filenames), scans ~3k files
|
||||
// in <1s, and fails if any file re-introduces:
|
||||
// - bare `--muted` / `--theme-*` CSS variables instead of Mana's
|
||||
// canonical `--color-*` tokens (validate-theme-variables.mjs), or
|
||||
// - raw white-alpha / neutral-palette Tailwind utilities instead of
|
||||
// theme-token utilities (validate-theme-utilities.mjs).
|
||||
'*.{svelte,css}': () => [
|
||||
'node scripts/validate-theme-variables.mjs',
|
||||
'node scripts/validate-theme-utilities.mjs',
|
||||
'node scripts/validate-theme-parity.mjs',
|
||||
],
|
||||
// Validate the tunnel config locally so a malformed ingress map can
|
||||
// never reach main. The validator runs entirely in node (no
|
||||
// cloudflared CLI dependency on the dev box) and catches the same
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue