Skip to content

runner

dev_tool.services.sass.runner

SassWatcherRunner

Bases: BaseProcessRunner

A class for running a Sass compilation watcher.

This class handles starting, monitoring, and stopping a Sass watch process in both local and containerized environments.

The constructor for the SassWatcherRunner class.

Parameters:

  • project_name (str) –

    The project name for container naming.

  • targets (list[str]) –

    The Sass source:output target pairs to watch.

  • style (str, default: 'expanded' ) –

    The output style (expanded or compressed).

  • source_map (bool, default: True ) –

    Whether to emit source maps.

Source code in dev_tool/services/sass/runner.py
def __init__(
    self,
    project_name: str,
    targets: list[str],
    style: str = 'expanded',
    source_map: bool = True
) -> None:
    """
    The constructor for the SassWatcherRunner class.

    :param project_name: The project name for container naming.
    :param targets: The Sass source:output target pairs to watch.
    :param style: The output style (expanded or compressed).
    :param source_map: Whether to emit source maps.
    """

    super().__init__(project_name=project_name)

    self.targets = targets
    self.style = style
    self.source_map = source_map

targets = targets instance-attribute

style = style instance-attribute

source_map = source_map instance-attribute