first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

28
class/sacy/phpsass.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
namespace sacy;
class PhpSassSacy
{
public static function isAvailable()
{
return extension_loaded('sass')/* && defined('SASS_FLAVOR') && SASS_FLAVOR == 'sensational' */
;
}
public static function compile($file, $fragment, $load_path)
{
$sass = new \Sass();
$load_path = array_map(function ($x) {
return getcwd().$x;
}, $load_path);
$sass->setIncludePath(implode(':', $load_path));
if ($file) {
return $sass->compile_file($file);
} else {
return $sass->compile($fragment);
}
}
}