config.rb
// Syntax
preferred_syntax = :scss
// Paths
http_path = "/"
images_dir = "/img"
javascripts_dir = "/js"
sass_dir = "/css/scss/"
css_dir = "/css/"
if environment == :development
line_comments = true
output_style = :nested
sass_options = {:debug_info => true}
end
if environment == :production
line_comments = false
output_style = :compressed
sass_options = {:debug_info => false}
require 'fileutils'
on_stylesheet_saved do |file|
if File.exists?(file)
filename = File.basename(file, File.extname(file))
File.rename(file, "css" + "/" + filename + ".min" + File.extname(file))
end
end
end
watch.bat
START compass watch -c config.rb -e development
START compass watch -c config.rb -e production
EXIT
Estrutura de arquivo
<project folder>/
CSS/
SCSS/
style.scss
style.css
style.min.css
IMG/
JS/
config.rb
watch.bat