Skip to content

marvelsrp/Yii_Less_extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

yii-less-compiler

###yii extension for complile less files add publish to assets

  1. Create folder "protected/extensions/less" and copy into files
  2. Paste to "protected/config/main.php":
'components'=>array(
...
        'lessScript' => array(
            'class' => 'application.extensions.less.IClientscript',
        ),
...)
  1. Create folder "protected/less" and add here .less files/dir.
  2. 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"

About

Yii extension for complile less files add publish to assets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages