Skip to main content

CLI

@ladle/react provides a CLI so you can serve (dev) or build your application:

Usage: ladle [options] [command]

Options:
-h, --help display help for command

Commands:
serve|dev [options] start developing
build [options] build static production app
preview [options] start a server to preview the build in outDir
help [command] display help for command

Serve command

Usage: ladle serve|dev [options]

start developing

Options:
-p, --port [number] port to serve the application
--stories [string] glob to find stories
--theme [string] theme light, dark or auto
--config [string] folder where config is located, default .ladle
--viteConfig [string] file with Vite configuration
--base [string] base URL path for build output
--mode [string] Vite mode
-h, --help display help for command

Build command

Usage: ladle build [options]

build static production app

Options:
-o, --outDir <path> output directory
--stories [string] glob to find stories
--theme [string] theme light, dark or auto
--config [string] folder where config is located, default .ladle
--viteConfig [string] file with Vite configuration
--base [string] base URL path for build output
--mode [string] Vite mode
-h, --help display help for command

Preview command

Usage: ladle preview [options]

start a server to preview the build in outDir

Options:
-o, --outDir <path> output directory
-p, --port [number] port to serve the application
--config [string] folder where config is located, default .ladle
--viteConfig [string] file with Vite configuration
--base [string] base URL path for build output
--mode [string] Vite mode
-h, --help display help for command

Do you want to work on Ladle and other web tooling? Our team at Uber is hiring!