shyim / sass
Provides a easy to use wrapper for libsass
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/shyim/sass
Requires
- ext-ffi: *
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');