Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function execute() |
||
21 | { |
||
22 | $scss = new Compiler(); |
||
23 | $scss->setImportPaths('resources/scss'); |
||
24 | |||
25 | if (!$this->getSiteConfiguration()->getDebuggingTraceEnabled()) { |
||
26 | $scss->setFormatter('ScssPhp\\ScssPhp\\Formatter\\Compressed'); |
||
27 | $scss->setSourceMap(Compiler::SOURCE_MAP_INLINE); |
||
28 | } |
||
29 | |||
30 | if (!is_dir(self::RESOURCES_GENERATED)) { |
||
31 | mkdir(self::RESOURCES_GENERATED); |
||
32 | } |
||
33 | |||
34 | foreach (['bootstrap-main', 'bootstrap-alt'] as $file) { |
||
35 | file_put_contents( |
||
36 | self::RESOURCES_GENERATED . '/' . $file . '.css', |
||
37 | $scss->compile('/*! Do not edit this auto-generated file! */ @import "' . $file . '";')); |
||
38 | } |
||
41 |