Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/application.rb')
-rw-r--r--config/application.rb22
1 files changed, 15 insertions, 7 deletions
diff --git a/config/application.rb b/config/application.rb
index 2293ab4cb68..4971d2853b9 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -185,6 +185,7 @@ module Gitlab
config.assets.precompile << "mailers/*.css"
config.assets.precompile << "page_bundles/_mixins_and_variables_and_functions.css"
config.assets.precompile << "page_bundles/boards.css"
+ config.assets.precompile << "page_bundles/cycle_analytics.css"
config.assets.precompile << "page_bundles/ide.css"
config.assets.precompile << "page_bundles/issues.css"
config.assets.precompile << "page_bundles/jira_connect.css"
@@ -219,13 +220,6 @@ module Gitlab
config.assets.paths << "#{config.root}/node_modules/xterm/src/"
config.assets.precompile << "xterm.css"
- # Add EE assets
- if Gitlab.ee?
- %w[images javascripts stylesheets].each do |path|
- config.assets.paths << "#{config.root}/ee/app/assets/#{path}"
- end
- end
-
# Import path for EE specific SCSS entry point
# In CE it will import a noop file, in EE a functioning file
# Order is important, so that the ee file takes precedence:
@@ -345,6 +339,20 @@ module Gitlab
end
end
+ # Add EE assets. They should take precedence over CE. This means if two files exist, e.g.:
+ #
+ # ee/app/assets/stylesheets/example.scss
+ # app/assets/stylesheets/example.scss
+ #
+ # The ee/ version will be preferred.
+ initializer :prefer_ee_assets, after: :append_assets_path do |app|
+ if Gitlab.ee?
+ %w[images javascripts stylesheets].each do |path|
+ app.config.assets.paths.unshift("#{config.root}/ee/app/assets/#{path}")
+ end
+ end
+ end
+
config.after_initialize do
# Devise (see initializers/8_devise.rb) already reloads routes if
# eager loading is enabled, so don't do this twice since it's