From d0dd1026b1b37417831e93badc39c902737578ed Mon Sep 17 00:00:00 2001 From: Gerrit Kaiser Date: Mon, 12 Mar 2012 16:59:03 +0000 Subject: [PATCH] added option for compressed output --- lib/guard/less.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/guard/less.rb b/lib/guard/less.rb index 684c530..80e43a3 100644 --- a/lib/guard/less.rb +++ b/lib/guard/less.rb @@ -15,7 +15,8 @@ def initialize(watchers=[], options={}) :all_after_change => true, :all_on_start => true, :output => nil, - :import_paths => [] + :import_paths => [], + :compress => false } super(watchers, defaults.merge(options)) @@ -80,7 +81,7 @@ def compile(lessfile, cssfile) File.open(lessfile,'r') do |infile| File.open(cssfile,'w') do |outfile| tree = parser.parse(infile.read) - outfile << tree.to_css + outfile << tree.to_css(:compress => options[:compress]) end end true