Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rails sass to v6 #3906

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 6.4'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.1', '>= 5.1.0'
gem 'sass-rails', '~> 6.0', '>= 6.0.0'
# See https:/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

Expand Down
25 changes: 13 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -514,17 +514,18 @@ GEM
nokogiri (>= 1.10.8)
rubyzip (>= 1.3.0)
rubyzip (1.3.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc (2.4.0-x64-mingw32)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (4.15.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
Expand Down Expand Up @@ -685,7 +686,7 @@ DEPENDENCIES
rubocop-rspec (>= 2.2.0)
rubyXL (>= 3.4.23)
rubyzip (>= 1.2.1)
sass-rails (~> 5.1, >= 5.1.0)
sass-rails (~> 6.0, >= 6.0.0)
selenium-webdriver (>= 3.142.3)
shakapacker (~> 7.1.0)
shoulda-matchers (>= 5.1.0)
Expand Down
5 changes: 5 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ class Application < Rails::Application

config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]

# Using a sass css compressor causes a scss file to be processed twice (once
# to build, once to compress) which breaks the usage of "unquote" to use
# CSS that has same function names as SCSS such as max
config.assets.css_compressor = nil

# do not add field-with-error div anymore
ActionView::Base.field_error_proc = proc do |html_tag, _instance|
html_tag
Expand Down
4 changes: 2 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
# Compress the sass with sassc
config.sass.style = :compressed

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
Expand Down