-
Notifications
You must be signed in to change notification settings - Fork 358
/
engine.rb
53 lines (49 loc) · 1.52 KB
/
engine.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require 'rails/engine'
require 'sprockets/railtie'
# Since we serve our assets directly through apache on an appliance after they
# are pre-compiled, there is no need to have sass/coffeescript loaded in the
# application, so we can save a bit of resources by not loading these two.
#
# That said, we still need to load both of these when pre-compiling the assets
# in production mode, so if Rake is defined, load things like we used to.
#
# For this to work properly, it is dependent on patternfly/patternfly-sass#150
if ENV["RAILS_ENV"] != "production" || defined?(Rake)
require 'sass-rails'
require 'coffee-rails'
require 'font-fabulous'
require 'patternfly-sass'
else
require 'bootstrap-sass/engine'
require 'font_awesome/sass/rails/engine'
require 'font-fabulous/engine'
require 'patternfly-sass/engine'
end
require 'high_voltage'
require 'lodash-rails'
require 'jquery-hotkeys-rails'
require "novnc-rails"
require 'webpacker'
module ManageIQ
module UI
module Classic
class Engine < ::Rails::Engine
config.autoload_paths << root.join('app', 'controllers', 'mixins').to_s
config.autoload_paths << root.join('lib').to_s
if Rails.env.production? || Rails.env.test?
require 'uglifier'
config.assets.js_compressor = Uglifier.new(
:compress => {
:unused => false,
:keep_fargs => true,
:keep_fnames => true
}
)
end
def vmdb_plugin?
true
end
end
end
end
end