Design tokens: ipal-tokens CLI, components on single names, templates, tests
- bin ipal-tokens: src/design/tokens.ts → src/design/tokens.css, --check, WCAG contrast report (fails on AA errors; --report, --warn-only) - CookieBanner / CookieButton read the single --ipal-* roles; the fallback follows color-scheme via light-dark() and still honours the legacy -dark variables - lightbox fade reads --ipal-duration / --ipal-ease-out - DESIGN.md and tokens.ts templates in ipal-setup/resources Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9511b12d19
commit
ca8e93eaf4
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
// ipal-tokens — the brand's design tokens: src/design/tokens.ts → src/design/tokens.css,
|
||||
// plus a WCAG contrast check (docs/design-tokens.md).
|
||||
// pnpm exec ipal-tokens → write src/design/tokens.css, print the contrast report
|
||||
// pnpm exec ipal-tokens --check → fail when the CSS is out of date (CI, ipal-doctor)
|
||||
// pnpm exec ipal-tokens --in x.ts --out y.css --warn-only
|
||||
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath, pathToFileURL } from 'node:url'
|
||||
|
||||
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const { runTokensCli } = await import(pathToFileURL(join(pkgRoot, 'dist', 'modules', 'tokens', 'cli.js')).href)
|
||||
process.exit(await runTokensCli(process.argv.slice(2)))
|
||||
Reference in New Issue
Block a user