From 8cd9afcfadbaa47d47e694ccd54041a3b52dd345 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 12 Apr 2017 12:30:24 -0400 Subject: [PATCH] move CSS precompilation to last step --- lib/stylesheet/manager.rb | 9 ++++----- lib/tasks/assets.rake | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/stylesheet/manager.rb b/lib/stylesheet/manager.rb index f0f549cabb9..ff4791bb77b 100644 --- a/lib/stylesheet/manager.rb +++ b/lib/stylesheet/manager.rb @@ -71,13 +71,12 @@ class Stylesheet::Manager end def self.max_file_mtime - globs = ["#{Rails.root}/app/assets/stylesheets/**/*.*css"] + globs = ["#{Rails.root}/app/assets/stylesheets/**/*.*css", + "#{Rails.root}/app/assets/images/**/*.*"] Discourse.plugins.map { |plugin| File.dirname(plugin.path) }.each do |path| - globs += [ - "#{path}/plugin.rb", - "#{path}/**/*.*css", - ] + globs << "#{path}/plugin.rb" + globs << "#{path}/**/*.*css" end globs.map do |pattern| diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 16a6e403ae3..2183d79098b 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -132,8 +132,6 @@ def concurrent? end task 'assets:precompile' => 'assets:precompile:before' do - # Run after assets:precompile - Rake::Task["assets:precompile:css"].invoke if $bypass_sprockets_uglify puts "Compressing Javascript and Generating Source Maps" @@ -184,6 +182,8 @@ task 'assets:precompile' => 'assets:precompile:before' do end + Rake::Task["assets:precompile:css"].invoke + end end