@epode/cambia-core
v0.1.2
Published
Read and validate adaptive design-system settings in a DESIGN.md. Core library for Cambia — per-user UI personalization.
Maintainers
Readme
Read and validate your adaptive design system config
@epode/cambia-core is the small, dependency-light library behind
Cambia — the toolkit that lets your app's interface
adapt to each user. Use this package to read, add, and validate Cambia's settings inside a
DESIGN.md file, straight from your own scripts
or CI. It does no file or network I/O — just plain functions in, results out.
npm i @epode/cambia-coreWhat you can do
import { validate, scaffold } from '@epode/cambia-core'
// Check a DESIGN.md is set up correctly (great for a CI step)
const result = validate(designMdText) // → { errors, warnings, info, ... }
if (result.errors.length) process.exit(1)
// Add the adaptive settings to a DESIGN.md without touching the rest of the file
const { text } = scaffold(designMdText) // returns the updated file contentAlso included:
tokensToTailwind/renderTailwindTheme— turn your DESIGN.md design tokens into a Tailwind theme, so colors, spacing and type stay in sync.readFrontMatter/writeFrontMatter/spliceBlock— helpers for working with the file.
Most people use the command-line tool or the runtime instead; reach for this package when you're building your own tooling or CI checks.
Part of Cambia. Free and open source (MIT).
