less-for-bootstrap it's compile bootstrap less files

  1. Requirements
  2. Usage
  3. Resources

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

bootstrap

! 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 !

Resources

lessphp Cssmin

6 0
9 followers
594 downloads
Yii Version: 1.1
License: Apache-2.0
Category: User Interface
Developed by: yiiesss
Created on: May 4, 2012
Last updated: 5 years ago

Downloads

show all

Related Extensions