From 45a23f524aa59d0d26bbf1999192a4aafe7fad32 Mon Sep 17 00:00:00 2001 From: Vikhyat Korrapati Date: Tue, 1 Apr 2014 20:19:34 +0530 Subject: [PATCH] Fix asset precompilation issues. --- .../stylesheets/vendor/{normalize.css => normalize.scss} | 0 lib/discourse_sass_importer.rb | 2 +- lib/tasks/assets.rake | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) rename app/assets/stylesheets/vendor/{normalize.css => normalize.scss} (100%) diff --git a/app/assets/stylesheets/vendor/normalize.css b/app/assets/stylesheets/vendor/normalize.scss similarity index 100% rename from app/assets/stylesheets/vendor/normalize.css rename to app/assets/stylesheets/vendor/normalize.scss diff --git a/lib/discourse_sass_importer.rb b/lib/discourse_sass_importer.rb index 0ee01fef5..4fbbd47ea 100644 --- a/lib/discourse_sass_importer.rb +++ b/lib/discourse_sass_importer.rb @@ -4,7 +4,7 @@ class DiscourseSassImporter < Sass::Importers::Filesystem GLOB = /\*|\[.+\]/ - def initialize(root) + def initialize(*args) @root = Rails.root.join('app', 'assets', 'stylesheets').to_s @same_name_warnings = Set.new end diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index bbc853561..68ccda938 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -16,6 +16,9 @@ task 'assets:precompile:before' do # let's make precompile faster using redis magic require 'sprockets' require 'digest/sha1' + require_dependency 'discourse_sass_importer' + + Sprockets::SassImporter = DiscourseSassImporter module ::Sprockets