Skip to content

Commit

Permalink
Drop sass-rails
Browse files Browse the repository at this point in the history
We are using webpacker (via the command line) to build sass assets.
This is disabled in production
And developers are using either rake update:ui or webpack --watch

So no need to include this in our dev chain.
  • Loading branch information
kbrock committed Oct 22, 2024
1 parent c01c87e commit 042f3f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Rails.application.config.assets.paths << ManageIQ::UI::Classic::Engine.root.join('node_modules')

Rails.application.config.assets.precompile << proc do |filename, path|
path =~ %r{app/assets} && !%w(.js .css).include?(File.extname(filename))
path =~ %r{app/assets} && !%w(.js .css .sass).include?(File.extname(filename))
end
12 changes: 0 additions & 12 deletions lib/manageiq/ui/classic/engine.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
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'
end

require 'high_voltage'
require 'webpacker'

Expand Down
2 changes: 1 addition & 1 deletion manageiq-ui-classic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |s|
# TODO: fix manageiq-decorators so we can eager load after manageiq-ui-classic
# s.add_dependency "manageiq-decorators"
s.add_dependency "more_core_extensions", ">= 3.2", "< 5"
s.add_dependency "sass-rails"
s.add_dependency "sprockets-rails"
s.add_dependency "uglifier", "~>4.2.0"
s.add_dependency "webpacker", "~>2.0.0"

Expand Down

0 comments on commit 042f3f3

Please sign in to comment.