I've used the version 0.9.1 r17 and it works perfectly without errors.
Now I've updated the less extension to ver 0.10.0 r20
I have an error like this
"Property 'LessCompiler.compress' is not defined"
What should I do?
Thanks
Posted 31 May 2012 - 09:09 PM
Posted 01 June 2012 - 07:27 AM
almix, on 25 May 2012 - 08:12 AM, said:
Posted 01 June 2012 - 07:59 AM
gio17, on 31 May 2012 - 09:09 PM, said:
Posted 10 June 2012 - 04:36 PM
thiagovidal, on 01 June 2012 - 07:27 AM, said:
Posted 11 June 2012 - 04:24 AM
...
'preload'=>array(
'less',
'log',
'bootstrap',
}
...
//less compiler
'less'=>array(
'class'=>'ext.less.components.LessCompiler',
'forceCompile'=>false,
'paths'=>array(
'less/main.less'=>'css/style.css',
),
),
...
//bootstrap extension
'bootstrap'=>array(
'class'=>'ext.bootstrap.components.Bootstrap',
'coreCss'=>false,
'yiiCss'=>false,
'responsiveCss'=>false,
'plugins'=>array(
//Optionally you can configure the "global" plugins (button, popover, tooltip and transition)
//To prevent a plugin from being loaded set it to false as demonstrated below
'transition'=>true,
),
),
//bootstrap, bootstrap-yii and responsive @import "../protected/extensions/bootstrap/lib/bootstrap/less/bootstrap.less"; @import "../protected/extensions/bootstrap/lib/bootstrap/less/responsive.less"; @import "../protected/extensions/bootstrap/assets/less/bootstrap-yii.less"; //vars @import "vars.less"; //layout @import "layout.less"; //navigation @import "navigation.less"; //overrides @import "overrides.less";
<link href="/css/style.css" type="text/css" rel="stylesheet">
<?php
/**
* Controller is the customized base controller class.
* All controller classes for this application should extend from this base class.
*/
class Controller extends CController
{
...
/**
* (non-PHPdoc)
* @see CController::init()
*/
public function init()
{
//include default css-file
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/style.css');
parent::init();
}
...
<?php
class DebugController extends Controller
{
...
/**
* recompile less files
*/
public function actionLess()
{
$less = Yii::app()->less;
$basePath = str_replace('\'', '/', Yii::getPathOfAlias('webroot') . '/');
foreach ($less->paths as $from=>$to) {
$fromPath = $basePath . $from;
$toPath = $basePath . $to;
$less->compile($fromPath, $toPath);
}
$this->redirect(Yii::app()->request->urlReferrer);
}
...
}

Posted 04 August 2012 - 09:33 AM
'less'=>array(
'class'=>'ext.less.components.LessCompiler',
'forceCompile'=>false, // indicates whether to force compiling
'paths'=>array(
"../protected/less/print.less" => "web/assets/print.css",
"../protected/less/common.less" => "web/assets/common.css",
),
),
if ($this->forceCompile || $this->hasChanges()) $this->compileAll();
protected function hasChanges()
{
$dirs = array();
foreach ($this->paths as $source => $destination)
{
$compiled = $this->getLastModified($destination);
if (!isset($lastCompiled) || $compiled < $lastCompiled)
$lastCompiled = $compiled;
if (!in_array(dirname($source), $dirs))
$dirs[] = $source;
}
foreach ($dirs as $dir) {
$modified = $this->getLastModified($dir);
if (!isset($lastModified) || $modified < $lastModified)
$lastModified = $modified;
}
return isset($lastCompiled) && isset($lastModified) && $lastModified > $lastCompiled;
}
protected function hasChanges()
{
$dirs = array();
foreach ($this->paths as $source => $destination)
{
$compiled = $this->getLastModified($destination);
if (!isset($firstCompiled) || $compiled < $firstCompiled)
$firstCompiled = $compiled;
if (!in_array(dirname($source), $dirs))
$dirs[] = $source;
}
foreach ($dirs as $dir) {
$modified = $this->getLastModified($dir);
if (!isset($lastModified) || $modified > $lastModified)
$lastModified = $modified;
}
return isset($firstCompiled) && isset($lastModified) && $lastModified > $firstCompiled;
}
Posted 17 August 2012 - 10:35 AM
plm, on 11 June 2012 - 04:24 AM, said:
<?php
class DebugController extends Controller
{
...
/**
* recompile less files
*/
public function actionLess()
{
$less = Yii::app()->less;
$basePath = str_replace('\'', '/', Yii::getPathOfAlias('webroot') . '/');
foreach ($less->paths as $from=>$to) {
$fromPath = $basePath . $from;
$toPath = $basePath . $to;
$less->compile($fromPath, $toPath);
}
$this->redirect(Yii::app()->request->urlReferrer);
}
...
}
Posted 20 August 2012 - 10:19 AM
mtzmedia, on 17 August 2012 - 10:35 AM, said:
Posted 02 October 2012 - 03:50 PM
LessCompiler: Failed to compile less file with message: parse error: failed at `@props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;` C:/xampp/htdocs/soedu/less/bootstrap/mixins.less on line 253.
Posted 02 October 2012 - 04:05 PM
.box-shadow(@shadowA, @shadowB:X, ...){
@props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
-webkit-box-shadow: @props;
-moz-box-shadow: @props;
box-shadow: @props;
}
Posted 05 October 2012 - 03:34 AM
Posted 06 October 2012 - 03:50 AM
IslamAmeen, on 02 October 2012 - 03:50 PM, said:
LessCompiler: Failed to compile less file with message: parse error: failed at `@props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;` C:/xampp/htdocs/soedu/less/bootstrap/mixins.less on line 253.
Posted 27 January 2013 - 08:40 PM