Usage
Arguments
Directory or file to watch. If a directory is provided, all CSS files within it are monitored.
Options
Output file path. The format is automatically inferred from the file extension (
.luau or .rbxmx).Default: Outputs to stdout on each changeName of the generated StyleSheet instance.
Explicitly set the output format. Valid values are
luau or rbxmx.Default: Inferred from --output extension (defaults to luau if not specified)Warning level for unsupported CSS features. Valid values:
all- Show all warningsunsupported- Show only unsupported feature warningsnone- Suppress all warnings
Watch mode does not support
--strict mode. Warnings are always non-fatal to avoid disrupting your development workflow.Examples
Watch a directory
src/styles/ and recompiles to StyleSheet.luau on any change.
Watch a single file
Watch with custom name
Watch and output to RBXMX
Behavior
- The watch process runs continuously until manually stopped (Ctrl+C)
- Compilation errors are printed to stderr but do not stop the watch process
- Each successful compilation prints:
Compiled -> <output-path> - When watching a directory, all
.cssfiles are included
Integration with Rojo
Watch mode pairs perfectly with Rojo’s live sync:- Trigger rbx-css to recompile the StyleSheet
- Trigger Rojo to sync the updated file to Studio
Example output
Stopping the watcher
PressCtrl+C to stop the watch process.
Related
- rbx-css compile - One-time compilation
- CLI flags reference - Complete flag documentation