PHP Sass

vendor: panique
projet: php-sass
Site Web: github.com/panique/php-sass

mkdir project
cd project
composer init
composer require panique/php-sass --dev # dépend de leafo/scssphp
mkdir scss css

sass.php

<?php
require_once 'vendor/autoload.php';
SassCompiler::run('scss/', 'css/');

scss/test.scss

$color: black;

body {
    color: red;

    #div {
        h1 {
            color: $color;
        }
    }
}
# from scss/test.scss to css/test.css
php sass.php