Download the PHP package armin/scssphp-bundle without Composer
On this page you can find all versions of the php package armin/scssphp-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download armin/scssphp-bundle
More information about armin/scssphp-bundle
Files in armin/scssphp-bundle
Package scssphp-bundle
Short Description Symfony bundle to parse scss sources at runtime.
License MIT
Informations about the package scssphp-bundle
ScssPHP - Symfony Bundle
This bundle for Symfony Framework (4-6), includes the scssphp/scssphp package, which allows you to parse SCSS sources (like Bootstrap) in your application, without need of Node.js and npm!
The ScssPHP bundle can recognize changes in SCSS source files (or Symfony configuration) automatically and only re-compiles those files. So, when you change something in your SCSS sources and refresh the application you see the results, instantly. You can disable this for the production environment.
Also, it provides a helpful debugger toolbar entry and a command which allows you to compile the SCSS sources from CLI.
It is released under MIT license.
Features
- Compile SCSS sources (like the Bootstrap framework) with pure PHP (thanks to scssphp/scssphp)
- Simple but powerful asset configuration (e.g. set variable values)
- Several output-formatter available (nested, compressed, crushed, etc.)
- Inline source map support
- Profiler Toolbar Debugging
- Symfony Command to compile SCSS sources on CLI
- Auto-update, when sources (or configuration) changes
Screenshots
ScssPHP in Symfony's profiler toolbar:
Hovering over ScssPHP profiler toolbar entry:
ScssPHP profiler panel:
Display of SCSS compiling errors:
Details of recent SCSS builds:
CLI command (with compiling error)
$ php bin/console scssphp:compile
Non-interactive CLI command
$ php bin/console scssphp:compile all -n
Installation
To install the scssphp-bundle you can just use composer:
The bundle also ships a Symfony Flex Recipe.
Usage and configuration
The scssphp bundle is triggered, when you use the {{ asset("...") }}
function in your Twig templates,
and the requested asset is configured in scssphp.assets
and scssphp.enabled
is true
.
Example asset call in twig:
Example configuration
For this example you also need to require the Bootstrap CSS framework:
Reference
Upgrade notice
Since version 2.0 the option "formatter" has been replaced by "outputStyle", which may have got values "expanded" or "compressed" (default).
Support
If you like this Symfony bundle, you can donate some funds to support further development. Thank you!
For help please visit the issue section on Github.
All versions of scssphp-bundle with dependencies
ext-json Version *
symfony/framework-bundle Version ^4.0 | ^5.0 | ^6.0
symfony/twig-bridge Version ^4.0 | ^5.0 | ^6.0
symfony/asset Version ^4.0 | ^5.0 | ^6.0
scssphp/scssphp Version ^1.10