Skip to content

Installation

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.

Terminal window
pnpm create dispersa

You will be prompted to choose:

  1. Project directory — where to scaffold the project
  2. TemplateTypeScript (programmatic build script with CSS output) or CLI (config-file workflow using the dispersa CLI)
  3. Install dependencies — optionally run the package manager for you

If you already have a project and want to add Dispersa to it:

Terminal window
pnpm add dispersa

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.

Dispersa is ESM-only. Add "type": "module" to your package.json when using the API or CLI in a Node.js project:

{
"type": "module"
}