Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shyim/php-sass
FFI wrapper for libsass
https://github.com/shyim/php-sass
Last synced: about 2 months ago
JSON representation
FFI wrapper for libsass
- Host: GitHub
- URL: https://github.com/shyim/php-sass
- Owner: shyim
- Archived: true
- Created: 2019-04-24T19:05:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-24T19:07:24.000Z (over 5 years ago)
- Last Synced: 2024-09-26T01:10:01.958Z (about 2 months ago)
- Language: PHP
- Size: 2.05 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP wrapper for libsass using FFI
Uses FFI to interact with libsass directly.
## Requirements
* PHP 7.4 or [FFI Extension](https://github.com/dstogov/php-ffi)
* Currently only binaries for linux available (gnu and musl)## Usage
```php
$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');
```