After digging to its original state, I finally found it!
require 'compass/sass_compiler'
- missing line!
The last line to start compilation is as follows:
Compass.sass_compiler.compile!
Here it is.
Btw: the Compass.sass_compiler method accepts some parameters ( source ) that are passed to the compiler, but using Compass.add_configuration as above performs the same Job.
I hope someone can use this information, happy compilation!
EDIT
Due to comments here is the complete code that works for my project. It is included in the assembly script, the following lines follow from initialization:
require 'compass' require 'compass/sass_compiler' Compass.add_configuration({ :project_path => _(), :output_style => :expanded, :cache_path => '<path to cache>', :http_fonts_path => '../fonts', :fonts_dir => '<relative path to fonts>', :sass_path => '<path to the scss files>', :css_path => '<path fot the compiled css>', :http_images_path => '../img', :images_path => '<path to images>' },'custom-name')
And these lines run in every compilation:
compiler = Compass.sass_compiler({ :only_sass_files => [ '<path to scss file to compile>' ]}) compiler.compile!
To get an overview of all the possible options, I recommend looking at the source and official documentation of sass and compass.
philipp
source share