1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Merge branch 'master' into extend

This commit is contained in:
Nathan Weizenbaum 2010-04-25 13:22:00 -07:00
commit ed9e8dee15
4 changed files with 13 additions and 4 deletions

View file

@ -21,6 +21,10 @@ now allow whitespace before the colon. For example:
* SCSS parsing speed is dramatically improved.
* Add a `:read_cache` option to allow the Sass cache to be read from but not written to.
* Don't write to the Sass cache when running `sass-convert`.
### Bug Fixes
* Variables are now allowed as arguments to `url()`.

View file

@ -182,6 +182,11 @@ Available options are:
: Whether parsed Sass files should be cached,
allowing greater speed. Defaults to true.
{#read_cache-option} `:read_cache`
: If this is set and `:cache` is not,
only read the Sass cache if it exists,
don't write to it if it doesn't.
{#never_update-option} `:never_update`
: Whether the CSS files should never be updated,
even if the template file changes.

View file

@ -297,7 +297,7 @@ END
@options[:for_engine][:cache_location] = loc
end
opts.on('-C', '--no-cache', "Don't cache to sassc files.") do
@options[:for_engine][:cache] = false
@options[:for_engine][:read_cache] = false
end
end
@ -570,7 +570,7 @@ END
super
require 'sass'
@options[:for_tree] = {}
@options[:for_engine] = {}
@options[:for_engine] = {:cache => false, :read_cache => true}
end
# Tells optparse how to parse the arguments.
@ -630,7 +630,7 @@ END
end
opts.on('-C', '--no-cache', "Don't cache to sassc files.") do
@options[:for_engine][:cache] = false
@options[:for_engine][:read_cache] = false
end
super

View file

@ -20,7 +20,7 @@ module Sass
options = Sass::Engine::DEFAULT_OPTIONS.merge(options)
text = File.read(filename)
if options[:cache]
if options[:cache] || options[:read_cache]
compiled_filename = sassc_filename(filename, options)
sha = Digest::SHA1.hexdigest(text)