I am using lessphp from http://leafo.net/lessphp/
there are certain files that depending on condition should not be compiled
in style.less
I have:
@import "@{bootstrap}";
@import "layout.less";
@import "grid.less";
@import "color.less";
@import "@{fontawesome}";
@import "@{vars}";
and less var in php
if($bootstrap){
$less->setVariables(array(
"bootstrap" => "'bootstrap.less'",
"fontawesome" => "'font-awesome.less'",
"vars" => "'variables.less'"
));
}
this works well except that when $bootstrap is not there
my css files ends up with
@import "";@import "";@import "";@import "";...
in head ,
how can I convert this to actual lessphp var
@import "bootstrap.less";
and use in my less file like
@{bootstrap}
instead
@import "@{bootstrap}";
so when boostrap is not there i dont endup with empty @import in css file .
I tried
"bootstrap" => "'@import "bootstrap.less";'"
but it is not returning anything
any help is appreciated