From f1eae1e0c8f58413899e8c559f7e9f7250011999 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Wed, 25 Jul 2012 11:50:56 -0700 Subject: [PATCH] Correct path in sass-assets-path test --- CHANGELOG.md | 1 + middleman-core/lib/middleman-core/application.rb | 10 ---------- middleman-more/fixtures/sass-assets-path-app/config.rb | 6 ++---- .../my-vendor/stylesheets/_partial.sass | 2 ++ .../lib/middleman-more/core_extensions/compass.rb | 5 +++++ 5 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 middleman-more/fixtures/sass-assets-path-app/my-vendor/stylesheets/_partial.sass diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f280e80..497650e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Master === +* Add `sass_assets_paths` option for arbitrary sass partial locations. * Don't catch CoffeeScript errors when in build mode. * Extract load_paths so they aren't locked into the binary * Add middleman/rack for better config.ru support diff --git a/middleman-core/lib/middleman-core/application.rb b/middleman-core/lib/middleman-core/application.rb index c33f6681..f0c76cf7 100644 --- a/middleman-core/lib/middleman-core/application.rb +++ b/middleman-core/lib/middleman-core/application.rb @@ -107,16 +107,6 @@ module Middleman # @return [String] set :css_dir, "stylesheets" - # Location of javascripts external to source directory. - # @return [Array] - # set :js_assets_paths, ["#{root}/assets/javascripts/", "/path/2/external/js/repository/"] - set :js_assets_paths, [] - - # Location of SASS/SCSS files external to source directory. - # @return [Array] - # set :sass_assets_paths, ["#{root}/assets/sass/", "/path/2/external/sass/repository/"] - set :sass_assets_paths, [] - # Location of images within source. Used by HTML helpers and Compass. # @return [String] set :images_dir, "images" diff --git a/middleman-more/fixtures/sass-assets-path-app/config.rb b/middleman-more/fixtures/sass-assets-path-app/config.rb index 3b1bc2c1..6a324517 100644 --- a/middleman-more/fixtures/sass-assets-path-app/config.rb +++ b/middleman-more/fixtures/sass-assets-path-app/config.rb @@ -1,6 +1,4 @@ - set :sass_assets_paths, [ - "#{root}/assets/stylesheets/", - # load from another app within gem source - "#{File.dirname(File.dirname(File.dirname(File.dirname(__FILE__))))}/fixtures/preview-app/source/stylesheets/" + File.join(root, "assets", "stylesheets"), + File.join(root, "my-vendor", "stylesheets") ] \ No newline at end of file diff --git a/middleman-more/fixtures/sass-assets-path-app/my-vendor/stylesheets/_partial.sass b/middleman-more/fixtures/sass-assets-path-app/my-vendor/stylesheets/_partial.sass new file mode 100644 index 00000000..3b0e67db --- /dev/null +++ b/middleman-more/fixtures/sass-assets-path-app/my-vendor/stylesheets/_partial.sass @@ -0,0 +1,2 @@ +body + font-size: 18px \ No newline at end of file diff --git a/middleman-more/lib/middleman-more/core_extensions/compass.rb b/middleman-more/lib/middleman-more/core_extensions/compass.rb index 98e2ac57..9d519bce 100644 --- a/middleman-more/lib/middleman-more/core_extensions/compass.rb +++ b/middleman-more/lib/middleman-more/core_extensions/compass.rb @@ -16,6 +16,11 @@ module Middleman # Hooks to manually update the compass config after we're # done with it app.define_hook :compass_config + + # Location of SASS/SCSS files external to source directory. + # @return [Array] + # set :sass_assets_paths, ["#{root}/assets/sass/", "/path/2/external/sass/repository/"] + app.set :sass_assets_paths, [] app.after_configuration do ::Compass.configuration do |config|