Commit cdb4fd67 authored by Rémy Coutable's avatar Rémy Coutable

Fix the EE assets paths and precompile config

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 705d2fd2
......@@ -111,17 +111,11 @@ module Gitlab
# Enable the asset pipeline
config.assets.enabled = true
# Support legacy unicode file named img emojis, `1F939.png`
config.assets.paths << Gemojione.images_path
config.assets.paths << "vendor/assets/fonts"
# EE specific paths.
config.assets.paths << "ee/app/assets/images"
config.assets.paths << "ee/app/assets/javascripts"
config.assets.paths << "ee/app/assets/stylesheets"
config.assets.paths << "#{config.root}/vendor/assets/fonts"
config.assets.precompile << "*.png"
config.assets.precompile << "*.ico"
config.assets.precompile << "print.css"
config.assets.precompile << "notify.css"
config.assets.precompile << "mailers/*.css"
......@@ -130,10 +124,23 @@ module Gitlab
config.assets.precompile << "xterm/xterm.css"
config.assets.precompile << "performance_bar.css"
config.assets.precompile << "lib/ace.js"
config.assets.precompile << "vendor/assets/fonts/*"
config.assets.precompile << "test.css"
config.assets.precompile << "locale/**/app.js"
## EE-specific assets config START
%w[images javascripts stylesheets].each do |path|
config.assets.paths << "#{config.root}/ee/app/assets/#{path}"
end
# Compile non-JS/CSS assets in the ee/app/assets folder by default
# Mimic sprockets-rails default: https://github.com/rails/sprockets-rails/blob/v3.2.1/lib/sprockets/railtie.rb#L84-L87
LOOSE_EE_APP_ASSETS = lambda do |logical_path, filename|
filename.start_with?(config.root.join("ee/app/assets").to_s) &&
!['.js', '.css', ''].include?(File.extname(logical_path))
end
config.assets.precompile << LOOSE_EE_APP_ASSETS
## EE-specific assets config END
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment