LiveStyle.Compiler.CSS.Pipeline (LiveStyle v0.15.0)

View Source

CSS generation pipeline.

This module orchestrates the transformation from manifest to final CSS output, including optional stats header.

Pipeline Stages

  1. Read manifest from storage
  2. Generate CSS via formatters
  3. Optionally prepend stats comment

Usage

# Generate CSS from current manifest
css = LiveStyle.Compiler.CSS.Pipeline.generate()

# Generate without stats
css = LiveStyle.Compiler.CSS.Pipeline.generate(stats: false)

# Generate from specific manifest
css = LiveStyle.Compiler.CSS.Pipeline.generate(manifest: my_manifest)

Summary

Functions

Generates CSS content from the manifest, optionally injecting into an input file.

Returns statistics about the manifest.

Functions

generate(opts \\ [])

@spec generate(keyword()) :: String.t()

Generates CSS content from the manifest, optionally injecting into an input file.

Options

  • :manifest - Use a specific manifest (default: reads from storage)
  • :stats - Include stats comment header (default: true)
  • :input - Optional input file path with @import "live_style" directive

When :input option is provided, reads the input file and replaces @import "live_style" with the generated CSS.

Returns

The complete CSS string ready to be written to a file.

stats(manifest)

@spec stats(LiveStyle.Manifest.t()) :: keyword()

Returns statistics about the manifest.

Useful for logging after CSS generation.