shyim/sass

此包已被废弃,不再维护。没有建议的替代包。

提供libsass的一个易于使用的包装器

dev-master 2019-04-24 19:07 UTC

This package is auto-updated.

Last update: 2022-10-29 02:20:49 UTC


README

使用FFI直接与libsass交互。

要求

  • PHP 7.4或FFI扩展
  • 目前只有Linux的二进制文件可用(gnu和musl)

用法

$compiler = new \ShyimSass\Compiler();

// Set options if wanted
$compiler->setOptions([
    'output_style' => \ShyimSass\Compiler::STYLE_EXPANDED
]);

// Get the compiled string as return value
echo $compiler->compile(__DIR__ . '/test.scss');

// Compile the file into app.css
$compiler->compile(__DIR__ . '/test.scss', __DIR__ . '/app.css');