rrcom / rrcom-less-module
CSS LESS compiler module for Zend Framework 2
v1.1.0
2015-01-20 10:24 UTC
Requires
- php: >=5.3.3
- leafo/lessphp: 0.4.0
This package is not auto-updated.
Last update: 2024-12-31 05:26:22 UTC
README
Zend frameword 2 module that automatically compile LESS file to CSS
How to use
- Save this module to your module directory
- add "RrcomLessModule" in your zf2 config inside the modules array (config/application.config.php)
- create "rrcomlessmodule.local.php" in config/autoload directory
- populate "rrcomlessmodule.local.php" with this example value
<?php return array( 'rrcomlessmodule' => array( // enable or disable auto compiling (must be disable in production environment to reduce processing time) 'enable' => true, // The files to compile and theirs output directory 'files' => array( array( // .less source directory 1 'less-file' => './public/less/sample1.less', // .css output directory 1 'css-file' => './public/css/sample1.css', /* * Set formatter * lessjs (default) — Same style used in LESS for JavaScript * compressed — Compresses all the unrequired whitespace * classic — lessphp’s original formatter */ 'formatter' => 'compressed', ), // If you need to compile multiple less files just add another array array( // .less source directory 2 'less-file' => './public/less/sample2.less', // .css output directory 2 'css-file' => './public/css/sample2.css', // Set formatter 'formatter' => 'compressed', ), ), ), );