What is jCompass ?
This is a plugin of CSSprepro which is itself an htmlresponse plugin for Jelix.
Under Jelix default configuration, create (if missing) a "CSSprepro" directory in your project's "plugins" directory. Clone this repository in that directory with :
git clone --recursive email@example.com:brice-t/jCompass.git
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 :
You need an up and running installation of Compass on command line to get it working (e.g. on a Debian-based distro, ''apt-get install ruby-compass'' will do the trick).
When including a CSS file (e.g. with addCSSLink()) you should set 'sass'=>true or 'scss'=>true as a param.
Another way of having a file compiled with Compass is including as file with .scss or .sass extension. You can set expected extensions in the comma-separated value of CSSprepro_jCompass_extensions under the jResponseHtml section.
E.g. in your response :
$this->addCSSLink($gJConfig->urlengine['basePath'].'themes/'.$gJConfig->theme.'/Css/style.sassFile', array( 'sass' => true ));
Your config file must activate jCompass plugin :
N.B. : the directories containing Compass 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 ...
You can configure jCompass's behviour regarding compilation:
[jResponseHtml] ;... ; always|onchange|once CSSprepro_jCompass_compile=always
If CSSprepro_jCompass_compile's value is not valid or empty, its default value is onchange.
- always : compile Compass file on all requests
- onchange : compile Compass file only if it has changed
- once : compile Compass file once and never compile it again (until compiled file is removed)