What is jelix-lessphp-plugin ?
This is an htmlresponse plugin.
Under Jelix default configuration, create an "htmlresponse" directory in your project's "plugins" directory. Clone this repository in that directory.
Note that you should have your app plugin directory in your modulesPath (defaultconfig.ini.php or entry point's config.ini.php) to get it working. The value should be at least :
When including a CSS file (e.g. with addCSSLink()) you should set "stylesheet/less" for the "rel" param.
E.g. in your response :
$this->addCSSLink($gJConfig->urlengine['basePath'].'themes/'.$gJConfig->theme.'/Css/style.css', array( 'rel' => 'stylesheet/less' ));
Your config file must activate lessphp plugin :
N.B. : the directories containing less files should be writable by your web server ! Indeed, compiled files will be written in that very same directory so that relative urls go on working ...
If you which to switch between lessphp and client-side less, you should just have to remove "lessphp" from your jResponseHtml's plugins and include less.js.
You can configure lessphp's behviour regarding compilation:
[jResponseHtml] ;... ; always|onchange|once lessphp_compile=always
If lessphp_compile's value is not valid or empty, its default value is onchange.
- always : compile less file on all requests
- onchange : compile less file only if it has changed
- once : compile less file once and never compile it again (until compiled file is removed)