dotzero / yii-less
This package is abandoned and no longer maintained.
No replacement package was suggested.
The Yii LessPhp extension that allows developers to compile LESS files into CSS on the fly, using the LessPhp compiler
v1.0.0
2016-05-02 08:27 UTC
Requires
- php: >=5.3.0
- leafo/lessphp: >=0.5.0
- yiisoft/yii: >=1.1.14
This package is auto-updated.
Last update: 2022-06-04 08:35:14 UTC
README
ELessPhp is an extension for the Yii PHP framework that allows developers to compile LESS files into CSS on the fly, using the LessPhp compiler.
Requirements
- Yii Framework 1.1.14 or above
- Composer
Install
Via composer:
$ composer require dotzero/yii-less
- Add vendor path to your configuration file, attach component and set properties:
'aliases' => array( ... 'vendor' => realpath(__DIR__ . '/../../vendor'), ), 'components' => array( ... 'less' => array( 'class' => 'vendor.dotzero.yii-less.ELessCompiler', 'lessphpDir' => 'vendor.leafo.lessphp', // Path alias of lessc.inc.php directory 'forceCompile' => false, // Force recompile LESS into CSS every initializes the component 'files' => array( // Files to compile (relative from your base path) 'css/style.less' => 'css/style.css', 'css/userstyle.less' => 'css/userstyle.css', ), ), ),
- Add the following to your config file
preloadsection:
'preload' => array( ... 'less', ),
License
Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php