Compass is great, but sometimes we need to have common framework code in one (global) location with local overrides in the app.
This addition adds built-in support for loading SASS/SCSS files from multiple locations external to the "source" directory and even the Middleman app root.
Example usage:
# in config.rb
set :sass_assets_path, [ "#{root}/assets/sass/", "~/.sass-repo/"]
Using symlinks or copying files to the Middleman project can get messy quickly. This fix reduces some of those issues.
First time working with Cucumber, so perhaps not the best way to do things.
* Tests for default setting which stores the .sass_cache directory in Middleman app root.
* Tests for custom setting which stores the .sass_cache directory in /tmp directory.
Please Note! Unable to test the output of the default .sass_cache location since the directory is stored outside of the app root during testing, but inside app root in "production"
The default output of SASS .sass_cache directory is in the Middleman app root directory, which to my mind adds clutter to the directory.
Secondly, when storing Middleman apps in a Dropbox subfolder, the .sass_cache directory gets synced unnecessarily.
This fix enables moving the .sass_cache directory to any path on the system, such as the "/tmp" directory for automatic discarding of files when restarting the system.
Suggested usage:
#in config.rb
set :sass_cache_path, File.join('/tmp', "middleman-#{File.basename(Dir.pwd)}", "sass_cache")
which could return something like:
`/tmp/middleman-example.com/sass_cache`
This keeps multiple projects separated and easily identifiable.
If the destination_path matches the index_file but the original path
does not (as can happen with proxied resources) then directory_indexes
will add the index file a second time, e.g. resource.path = "myres.html"
and resource.destination_path = "myres/index.html" then
directory_indexes will convert this to resource.destination_path =
"myres/index/index.html". This patch fixes that by making
directory_indexes check the destination_path when determining whether to
reroute.