Please Note!
This fix depends upon support in the 'middleman-sprockets' gem, where the following code must be present:
# lib/middleman-sprockets/extension.rb
<snip…>
append_path app.css_dir
# add custom assets paths to the scope
app.js_assets_paths.each do |p|
append_path p
end
The purpose of this addition is to support including JS files from external (global) repositories.
Example usage:
# in config.rb
set :js_assets_path, [ "#{root}/assets/js/", "~/.js-repo/"]
Using symlinks or copying files to the Middleman project can get messy quickly. This fix reduces some of those issues.
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.