FIX: don't create digestless css files in production. With multisite setup, it's keeps getting swapped out for the current site, which is slow and pointless. Digestless css files are for auto-reload of css in dev env

This commit is contained in:
Neil Lalonde 2014-05-27 16:08:47 -04:00
parent 5095de815d
commit 39bac5b36c
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ class DiscourseStylesheets
end
def ensure_digestless_file
unless File.exist?(stylesheet_fullpath_no_digest) && File.mtime(stylesheet_fullpath) == File.mtime(stylesheet_fullpath_no_digest)
# file without digest is only for auto-reloading css in dev env
unless Rails.env.production? || (File.exist?(stylesheet_fullpath_no_digest) && File.mtime(stylesheet_fullpath) == File.mtime(stylesheet_fullpath_no_digest))
FileUtils.cp(stylesheet_fullpath, stylesheet_fullpath_no_digest)
end
end