Skip to content

Commit

Permalink
Switch to dartsass-sprockets for SCSS compilation
Browse files Browse the repository at this point in the history
This is a drop-in replacement for `sassc-rails` and doesn't mean dropping `sprockets` yet, or changing the way you run the local server `rails s`.

Switching to `dartsass-rails` and dropping `sprockets` may be desirable in the future.
  • Loading branch information
nimmolo committed Mar 21, 2024
1 parent 723ed91 commit a913194
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ gem("turbo-rails")
gem("redis", "~> 4.0")
# solid_cache for cache store db
gem("solid_cache")
# Compile SCSS for stylesheets
gem("sassc-rails")
# add locale to cache key
gem("cache_with_locale")

# Fix a version problem betw stimulus and sprockets. (not sprockets-rails)
# Delete this dependency declaration if the issue gets resolved:
# https://github.com/hotwired/stimulus-rails/issues/108
gem("sprockets", "~>4.2.1")
# Compile SCSS for stylesheets
gem("dartsass-sprockets")

gem("date")
gem("loofah")
Expand Down
28 changes: 21 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ GEM
cuprite (0.15)
capybara (~> 3.0)
ferrum (~> 0.14.0)
dartsass-sprockets (3.1.0)
railties (>= 4.0.0)
sassc-embedded (~> 1.69)
sprockets (> 3.0)
sprockets-rails
tilt
database_cleaner-active_record (2.1.0)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
Expand All @@ -129,6 +135,12 @@ GEM
ffi (1.16.3)
globalid (1.2.1)
activesupport (>= 6.1)
google-protobuf (4.26.0-arm64-darwin)
rake (>= 13)
google-protobuf (4.26.0-x86_64-darwin)
rake (>= 13)
google-protobuf (4.26.0-x86_64-linux)
rake (>= 13)
hashdiff (1.1.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -265,14 +277,16 @@ GEM
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sass-embedded (1.72.0-arm64-darwin)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.72.0-x86_64-darwin)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.72.0-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
sassc-embedded (1.70.1)
sass-embedded (~> 1.70)
set (1.1.0)
simplecov (0.22.0)
docile (~> 1.1)
Expand Down Expand Up @@ -363,6 +377,7 @@ DEPENDENCIES
cache_with_locale
capybara
cuprite
dartsass-sprockets
database_cleaner-active_record
date
debug (>= 1.0.0)
Expand Down Expand Up @@ -394,7 +409,6 @@ DEPENDENCIES
rubocop-rails
rubocop-thread_safety
rubyzip (~> 2.3.0)
sassc-rails
simplecov
simplecov-lcov
solid_cache
Expand Down

0 comments on commit a913194

Please sign in to comment.