###yii extension for complile less files add publish to assets
- Create folder "protected/extensions/less" and copy into files
- Paste to "protected/config/main.php":
'components'=>array(
...
'lessScript' => array(
'class' => 'application.extensions.less.IClientscript',
),
...)
- Create folder "protected/less" and add here .less files/dir.
- Use:
Yii::app()->lessScript->registerLessFile($file_name, $less_subdir='');
P.S. need clear "protected/runtime/less" and "/assets"
###For example:
1. protected/less/main.less :
Yii::app()->lessScript->registerLessFile('main');
Publish to "assets/{hash}/main.css"
2. protected/less/auth/login.less :
Yii::app()->lessScript->registerLessFile('login','auth');
Publish to "assets/{hash}/auth/login.css"