lib/spiderfw/templates/resources/sass.rb in spiderfw-0.6.23 vs lib/spiderfw/templates/resources/sass.rb in spiderfw-0.6.24
- old
+ new
@@ -4,11 +4,11 @@
def default_options
@default_options ||= {
:css_location => './public/stylesheets',
:always_update => false,
- :always_check => true,
+ :always_check => false,
:full_exception => true,
:cache_location => File.join(Spider.paths[:tmp], 'sass', '.sass_cache')
}.freeze
end
end
@@ -60,10 +60,11 @@
:css_filename => dest
}
config = Compass::Configuration::Data.new(:spider, options)
Compass.add_project_configuration(config)
compiler = Compass::Compiler.new(work_dir, File.dirname(src), File.dirname(dest), options)
- compiler.compile(src, dest)
+
+ compiler.compile(src, dest) if compiler.out_of_date?
else
engine = Sass::Engine.for_file(src, {})
output = engine.render
File.open(dest, 'w') do |f|
f.write "/* This file is autogenerated; do not edit directly (edit #{src} instead) */\n\n"
\ No newline at end of file