shyim/sass

This package is abandoned and no longer maintained. No replacement package was suggested.

Provides a easy to use wrapper for libsass

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

This package is auto-updated.

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


README

Uses FFI to interact with libsass directly.

Requirements

  • PHP 7.4 or FFI Extension
  • Currently only binaries for linux available (gnu and musl)

Usage

$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');