Installation
Create a New Project
Section titled “Create a New Project”The fastest way to get started is with create-dispersa. It scaffolds a project with tokens, a build script, and a ready-to-run configuration.
pnpm create dispersanpm create dispersa@latestyarn create dispersabun create dispersaYou will be prompted to choose:
- Project directory — where to scaffold the project
- Template — TypeScript (programmatic build script with CSS output) or CLI (config-file workflow using the
dispersaCLI) - Install dependencies — optionally run the package manager for you
Add to an Existing Project
Section titled “Add to an Existing Project”If you already have a project and want to add Dispersa to it:
pnpm add dispersanpm install dispersayarn add dispersaTypeScript Setup
Section titled “TypeScript Setup”Dispersa is written in TypeScript and ships with type definitions. No @types packages are required.
If you use TypeScript configs (tsconfig, etc.), ensure TypeScript 5+ for full compatibility.
ESM-Only Package
Section titled “ESM-Only Package”Dispersa is ESM-only. Add "type": "module" to your package.json when using the API or CLI in a Node.js project:
{ "type": "module"} Your First Build Run your scaffolded project and explore the generated output.