mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
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:
parent
5095de815d
commit
39bac5b36c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue