프로젝트
GitHub에서 보기
sugarcube-sh/sugarcube
소개
Design tokens in, CSS and components out.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- +2
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalsugarcube
Design tokens in, CSS & components out
Sugarcube is a tool for building front ends on DTCG design tokens. It connects your tokens to CSS variables, utility classes, CUBE CSS, and copy-to-own components — via the Vite plugin or CLI.
Quick start
npx @sugarcube-sh/cli init
This walks you through setup: starter tokens, CUBE CSS, components, and Vite plugin. The CLI is installed locally, so you can use sugarcube going forward.
With the Vite plugin:
// vite.config.ts
import sugarcube from "@sugarcube-sh/vite";
export default {
plugins: [sugarcube()],
};
import "virtual:sugarcube.css";
Without the Vite plugin:
sugarcube generate
Or add it to your npm scripts:
{
"scripts": {
"styles:generate": "sugarcube generate",
"styles:generate:watch": "sugarcube generate --watch",
"tokens:validate": "sugarcube validate"
}
}
Documentation
Packages
| Package | Description |
|---|---|
@sugarcube-sh/cli |
CLI for initialization, generation, and components |
@sugarcube-sh/vite |
Vite plugin with HMR |
@sugarcube-sh/core |
Core token processing |
License
See LICENSE.md.
관련 프로젝트 살펴보기
불러오는 중…