Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.uniwind.dev/llms.txt

Use this file to discover all available pages before exploring further.

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

uniwind generate-artifacts --css ./global.css
Pass extra themes with repeated --theme flags and set the TypeScript declarations path with --dts:
uniwind generate-artifacts --css ./global.css --theme premium --theme ocean --dts ./src/uniwind-types.d.ts

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
@import 'tailwindcss';
@import 'uniwind';

—theme

--theme
string
Extra theme name. Pass this option multiple times to match the custom themes from extraThemes.
uniwind generate-artifacts --css ./global.css --theme premium --theme ocean
Define these themes in your Metro or Vite config with extraThemes:
metro.config.js
module.exports = withUniwindConfig(config, {
  cssEntryFile: './global.css',
  extraThemes: ['premium', 'ocean'],
});
vite.config.ts
uniwind({
  cssEntryFile: './global.css',
  extraThemes: ['premium', 'ocean'],
})

—dts

--dts
string
Generated TypeScript declarations path.
uniwind generate-artifacts --css ./global.css --dts ./src/uniwind-types.d.ts
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.
uniwind generate-artifacts --help

Usage Reference

uniwind generate-artifacts --css <file> [--theme <name>...] [--dts <file>]

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