Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sass Processor

Purpose

Compiles SCSS and SASS files into CSS using the Sass compiler.

The Rust alternative is isass: Sass and SCSS compiled in-process with the grass compiler, no Sass installation needed. Switching is sass → isass in the stanza header.

How It Works

Files matching configured extensions in the sass/ directory are compiled to CSS. Output is written to out/processor.generator.sass/ preserving the directory structure:

sass/style.scss  ->  out/processor.generator.sass/style.css
sass/components/button.scss  ->  out/processor.generator.sass/components/button.css

Declare the sass analyzer alongside this processor. It makes every file a stylesheet loads (@use, @forward, @import, transitively) an input of that stylesheet. Without it, editing a partial does not rebuild the stylesheets that use it, and they keep their old CSS. If you pass --load-path in args, give the analyzer the same directories in load_paths.

Source Files

  • Input: sass/**/*{src_extensions}
  • Output: out/processor.generator.sass/ mirroring the source structure with .css extension

Configuration

[processor.generator.sass]
command = "sass"                          # Sass compiler binary (default: "sass")
src_extensions = [".scss", ".sass"]           # File extensions to process
output_dir = "out/processor.generator.sass"                   # Output directory (default: "out/processor.generator.sass")
dep_inputs = []                         # Additional files that trigger rebuilds
KeyTypeDefaultDescription
commandstring"sass"Path to sass compiler
src_extensionsstring[][".scss", ".sass"]File extensions to discover
output_dirstring"out/processor.generator.sass"Output directory
dep_inputsstring[][]Extra files whose changes trigger rebuilds

Batch support

Each input file is processed individually, producing its own output file.

Clean behavior

This processor is a Generator — rsconstruct clean outputs removes each declared output file individually with no directory recursion. After all per-product cleans complete, the orchestrator removes any parent directories that are now empty. Pass --no-empty-dirs to keep them. See Clean behavior and rsconstruct clean.