awakenweb / beverage-scss
Scss and Compass compiler module for Beverage task runner
Requires
- php: >=5.4
- awakenweb/beverage: *
- leafo/scssphp-compass: dev-master
This package is not auto-updated.
Last update: 2019-02-20 18:15:50 UTC
README
Scss and Compass compiler module for Beverage task runner
Prerequisites
- PHP 5.4+
- Composer
Install
Add this to your composer.json file:
{ "require": { "awakenweb/beverage-scss": "dev-master" } }
Configuration
In your drinkmenu.php
file, add the following task:
<?php use Awakenweb\Beverage\Beverage; use Awakenweb\BeverageScss\Scss; function defaultTask() { scss(); } function scss() { Beverage::files('main.scss', ['scss']) ->then(new Scss('scss', Scss::USE_COMPASS, Scss::NESTED)) ->destination('build/css'); }
Options
The Scss
class accepts 3 parameters :
-
importPath
: tells the Scss compiler where to search for when it encounters an@include
or@import
directives. -
useCompass
: self-explanatory. True or False. You can useScss::USE_COMPASS
orScss::NO_COMPASS
for better maintenability. -
formatter
: choose from the 4 available formatters :Scss::NESTED
,Scss::COMPRESSED
,Scss::CRUNCHED
, orScss::NORMAL
. (CRUNCHED
is equivalent toCOMPRESSED
but also stripes CSS comments)
Contributing
Bugs
-
If you found a bug and feel confident enough to correct it, please send a pull request with your bugfix and a unit test to identify the bug.
-
If you can't correct the bug by yourself, please fill an issue on this Github repository.
Security vulnerabilities
- If you think you found a security vulnerability in this package, please contact Mathieu SAVELLI by email before doing anything else.
New Features
-
Before sending a Pull Request for a new feature you want to add directly to the Beverage codebase, please contact Mathieu SAVELLI by email. If the feature is found to be a good fit for Beverage, you are free to make a pull request.
-
If you like this package, the best thing you can do is to provide new awesome modules for Beverage and notify me. I'll add them to this readme.
Contributors
- Main developer: Mathieu SAVELLI (mathieu.savelli@awakenweb.fr)
License
Beverage and its official modules are released under the MIT License