max / balanced_breakfast
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+8 insertions,
-0 deletions
| @@ -81,7 +81,15 @@ | |||
| 81 | 81 | # themes.js applies the intent layer generically (setProperty on each | |
| 82 | 82 | # theme.intents key), so there is no per-token map to grep; the annotation | |
| 83 | 83 | # is the contract. Catches a new token added without deciding what drives it. | |
| 84 | + | # Scanning is restricted to declaration syntax (a token followed by a colon) | |
| 85 | + | # with comment bodies stripped first. Matching the bare token name meant a | |
| 86 | + | # comment that merely NAMES a token failed the build even when the token is | |
| 87 | + | # declared nowhere in the file. That bites exactly as the design system | |
| 88 | + | # succeeds: every token that moves out to a generated sheet leaves behind a | |
| 89 | + | # comment saying where it went, and each of those was a build failure. | |
| 84 | 90 | root_tokens=$(awk '/^:root \{/{flag=1; next} /^\}/{flag=0} flag' "$SRC_CSS" \ | |
| 91 | + | | sed 's|/\*[^*]*\*/||g' \ | |
| 92 | + | | grep -oE -- '--[a-z0-9-]+[[:space:]]*:' \ | |
| 85 | 93 | | grep -oE -- '--[a-z0-9-]+' | sort -u || true) | |
| 86 | 94 | unmapped="" | |
| 87 | 95 | for tok in $root_tokens; do |