diff --git a/middleman-core/features/support/env.rb b/middleman-core/features/support/env.rb index 4c122ea1..29799086 100644 --- a/middleman-core/features/support/env.rb +++ b/middleman-core/features/support/env.rb @@ -1,5 +1,4 @@ ENV["TEST"] = "true" -ENV["AUTOLOAD_SPROCKETS"] ||= "false" require 'sassc' diff --git a/middleman-core/lib/middleman-core/application.rb b/middleman-core/lib/middleman-core/application.rb index 5b8cbe9d..ff2d4e4f 100644 --- a/middleman-core/lib/middleman-core/application.rb +++ b/middleman-core/lib/middleman-core/application.rb @@ -124,15 +124,15 @@ module Middleman # @return [String] define_setting :js_dir, 'javascripts', 'Location of javascripts within source' - # Location of stylesheets within source. Used by Compass. + # Location of stylesheets within source. # @return [String] define_setting :css_dir, 'stylesheets', 'Location of stylesheets within source' - # Location of images within source. Used by HTML helpers and Compass. + # Location of images within source. Used by HTML helpers. # @return [String] define_setting :images_dir, 'images', 'Location of images within source' - # Location of fonts within source. Used by Compass. + # Location of fonts within source. # @return [String] define_setting :fonts_dir, 'fonts', 'Location of fonts within source' @@ -144,7 +144,7 @@ module Middleman # @return [String] define_setting :build_dir, 'build', 'Where to build output files' - # Default prefix for building paths. Used by HTML helpers and Compass. + # Default prefix for building paths. Used by HTML helpers. # @return [String] define_setting :http_prefix, '/', 'Default prefix for building paths' diff --git a/middleman-core/lib/middleman-core/builder.rb b/middleman-core/lib/middleman-core/builder.rb index f0a57aa1..c92c6a51 100644 --- a/middleman-core/lib/middleman-core/builder.rb +++ b/middleman-core/lib/middleman-core/builder.rb @@ -54,7 +54,6 @@ module Middleman @app.execute_callbacks(:before_build, [self]) queue_current_paths if @cleaning - prerender_css output_files @@ -67,39 +66,14 @@ module Middleman !@has_error end - # Pre-request CSS to give Compass a chance to build sprites - # @return [Array] List of css resources that were output. - Contract ResourceList - def prerender_css - logger.debug '== Prerendering CSS' - - css_files = @app.sitemap.resources.select do |resource| - resource.ext == '.css' - end.each(&method(:output_resource)) - - logger.debug '== Checking for Compass sprites' - - # Double-check for compass sprites - @app.files.find_new_files! - @app.sitemap.ensure_resource_list_updated! - - css_files - end - # Find all the files we need to output and do so. # @return [Array] List of resources that were output. Contract ResourceList def output_files logger.debug '== Building files' - # Sort paths to be built by the above order. This is primarily so Compass can - # find files in the build folder when it needs to generate sprites for the - # css files. - # - # Loop over all the paths and build them. @app.sitemap.resources .sort_by { |resource| SORT_ORDER.index(resource.ext) || 100 } - .reject { |resource| resource.ext == '.css' } .select { |resource| !@glob || File.fnmatch(@glob, resource.destination_path) } .each(&method(:output_resource)) end diff --git a/middleman-core/lib/middleman-core/extension.rb b/middleman-core/lib/middleman-core/extension.rb index 3747b7d5..a44273a3 100644 --- a/middleman-core/lib/middleman-core/extension.rb +++ b/middleman-core/lib/middleman-core/extension.rb @@ -61,7 +61,7 @@ module Middleman # * `app.before_render {|body, path, locs, template_class| ... }` - Manipulate template sources before they are rendered. # * `app.after_render {|content, path, locs, template_class| ... }` - Manipulate output text after a template has been rendered. It is also common to install a Rack middleware to do this instead. # * `app.ready { ... }` - Run code once Middleman is ready to serve or build files (after `after_configuration`). - # * `app.compass_config { |compass_config| ... }` - Manipulate the Compass configuration after it has been set up. + # # @see http://middlemanapp.com/advanced/custom/ Middleman Custom Extensions Documentation class Extension diff --git a/middleman-core/lib/middleman-core/renderers/sass_functions.rb b/middleman-core/lib/middleman-core/renderers/sass_functions.rb index 2a587b50..dbe4c015 100644 --- a/middleman-core/lib/middleman-core/renderers/sass_functions.rb +++ b/middleman-core/lib/middleman-core/renderers/sass_functions.rb @@ -112,26 +112,3 @@ else end SASS_MODULE::Script::Functions.send :include, ::Middleman::Sass::Functions - -# module SASS_MODULE::Script::Functions -# include ::Middleman::Sass::Functions - -# # # Hack to ensure previous API declarations (by Compass or whatever) -# # # don't take precedence. -# # [:asset_path, :asset_url, :image_path, :image_url, :font_path, :font_url, :asset_data_uri].each do |method| -# # defined?(@signatures) && @signatures.delete(method) -# # end - -# # declare :asset_path, [:source], var_kwargs: true -# # declare :asset_path, [:source, :kind] -# # declare :asset_url, [:source], var_kwargs: true -# # declare :asset_url, [:source, :kind] -# # declare :image_path, [:source], var_kwargs: true -# # declare :image_url, [:source], var_kwargs: true -# # declare :image_url, [:source, :only_path] -# # declare :image_url, [:source, :only_path, :cache_buster] -# # declare :font_path, [:source], var_kwargs: true -# # declare :font_url, [:source], var_kwargs: true -# # declare :font_url, [:source, :only_path] -# # declare :asset_data_uri, [:source] -# end