Skip to main content

Overview

The generate-artifacts command generates Uniwind artifacts from your CSS entry file. Use it when you need to run artifact generation manually from a script or CI step. This is useful in CI actions when you run tools that need generated Uniwind types before Metro or Vite starts, for example a linter or formatter for Tailwind classes.

Basic Usage

Pass extra themes with repeated --theme flags and set the TypeScript declarations path with --dts:

Options

—css

--css
string
required
CSS entry file path, for example ./global.css.
This should point to the CSS file where you import Tailwind and Uniwind:
global.css

—theme

--theme
string
Extra theme name. Pass this option multiple times to match the custom themes from extraThemes.
Define these themes in your Metro or Vite config with extraThemes:
metro.config.js
vite.config.ts

—dts

--dts
string
Generated TypeScript declarations path.
Place the .d.ts file in your src or app directory for automatic TypeScript inclusion. For custom paths outside these directories, add the file to your tsconfig.json.

—help

--help
boolean
Show help for the command.

Usage Reference

Metro Config

Configure automatic artifact generation in Metro

Global CSS

Learn more about configuring your CSS entry file

Custom Themes

Create and register extra themes