You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to use server with scssphp 2.0.1 I had to add one line to omit the utf-bom (because that was placed after the "/* compiled by scssphp 2.0.1 on Mon, ...") and one line to set the importPaths (because that has to be implicitely set now).
My code is now:
<?php
require_once './vendor/autoload.php';
use ScssPhp\ScssPhp\Compiler;
use ScssPhp\ScssPhp\OutputStyle;
use ScssPhp\Server\Server;
$scssDirectory = 'scss';
$scssCompiler = new Compiler();
$scssCompiler->setCharset(false);
$scssCompiler->setOutputStyle(OutputStyle::COMPRESSED);
$scssCompiler->setImportPaths($scssDirectory);
new Server($scssDirectory, null, $scssCompiler)
->serve();
One could add defaults for those two in the __construct of Server.php to make it work nicely again with scssphp 2.0.1 and real easy to use.
Activity