[Command Line] The --force option will now force recompilation. Useful when the stylesheets don't appear to need a recompile.

This commit is contained in:
Chris Eppstein 2009-05-02 15:07:14 -07:00
parent ddfba8ec83
commit c40566c93b
3 changed files with 8 additions and 6 deletions

View File

@ -78,7 +78,7 @@ task :examples do
output.close output.close
end end
Dir.chdir example do Dir.chdir example do
Compass::Exec::Compass.new([]).run! Compass::Exec::Compass.new(["--force"]).run!
end end
end end
end end

View File

@ -57,7 +57,7 @@ module Compass
# Compile one Sass file # Compile one Sass file
def compile(sass_filename, css_filename, options) def compile(sass_filename, css_filename, options)
if Sass::Plugin.exact_stylesheet_needs_update?(css_filename, sass_filename) if options[:force] || Sass::Plugin.exact_stylesheet_needs_update?(css_filename, sass_filename)
logger.record :compile, basename(sass_filename) unless options[:quiet] logger.record :compile, basename(sass_filename) unless options[:quiet]
engine = ::Sass::Engine.new(open(sass_filename).read, engine = ::Sass::Engine.new(open(sass_filename).read,
:filename => sass_filename, :filename => sass_filename,

View File

@ -11,10 +11,12 @@ module Compass
end end
def perform def perform
Compass::Compiler.new(working_path, compiler = Compass::Compiler.new(working_path,
projectize(Compass.configuration.sass_dir), projectize(Compass.configuration.sass_dir),
projectize(Compass.configuration.css_dir), projectize(Compass.configuration.css_dir),
Compass.sass_engine_options.merge(:quiet => options[:quiet])).run Compass.sass_engine_options.merge(:quiet => options[:quiet],
:force => options[:force]))
compiler.run
end end
end end