This is my first extention , and it's not very complete.
It is inspired from less extention (that not working with last amazing extention version of bootstrap) and use lessphp v0.3.4-2 that is working with the twitter boortrap 2.03
the extention compile and also minify the css code !
Requirements ¶
! this extention is developped and tested under yii 1.1.10
!! this compiler replace your bootstrap default files , for your first try you can save a copy of existing file just in case it not working for you !
Usage ¶
extract file into protected/extentions/
Important : you have to declare the less extention in the preload config before bootstrap (it's required for buplishing assets of bootstrap) You also have to set
'debug' => true
if bootstrap config in order to publish assets .
Note that the compilation of less code is automatic every time ! for disabling it after all the less work is done , you need to comment (or remove) less entries from main.php config file
'preload'=>array(
'log',
'less',
'bootstrap',
.
.
.
),
Add this entry in components :
'components'=>array(
.
.
.
'less'=>array(
'class'=>'ext.less.components.LessCompiler',
'paths'=>array(
'protected/extensions/bootstrap/lib/bootstrap/less/bootstrap.less' => 'protected/extensions/bootstrap/assets/css/bootstrap.min.css',
'protected/extensions/bootstrap/lib/bootstrap/less/responsive.less' => 'protected/extensions/bootstrap/assets/css/bootstrap-responsive.min.css',
),
),
.
.
.
)
hope that will help you !
require file not found fix.
require Yii::app()->basepath.'/extensions/less/lib/lessphp/lessc.inc.php';
please, fix the required file bug
Thanks Stageline for sharing the solution for required bug
+1 Stageline
+1 yiiesss
Thank you guys, excellent extension combined with bootstrap!
:)
regards!
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.