-
Notifications
You must be signed in to change notification settings - Fork 67
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
replacing sassc with dartsass-sprockets #92
Conversation
There appear to be quite a few Sass engines out there. Perhaps we can take a similar approach to the bootstrap ruby gem and support more of them? https://github.com/twbs/bootstrap-rubygem/blob/main/lib/bootstrap/engine.rb |
@glebm I'd be happy to update the PR with the library loading script. I'll add similar verbiage to the README as the bootstrap gem. |
Ruby 3.0 and below are end of life and no longer supported. Should legacy versions of ruby be removed from the testing matrix? Only Rails 7.1, 7.0, and 6.1 is receiving support from the official rails team. Should Rails 5.0 and 4.2 be removed from the testing matrix? |
Yep, please remove them |
b94492c
to
07238af
Compare
@glebm there's a dependency issue with rails_7_1 and ruby_version 3.1, otherwise all the tests pass. Here is the failed run: https://github.com/wayhomeservices/rails_email_preview/actions/runs/9921493773/job/27409522524 I commented it out in the PR. I'm not 100% sure it is worth tracking down or not. |
d01bd0f
to
9a4dd0b
Compare
9a4dd0b
to
20bae12
Compare
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Thank you for your effort and patience, Jonathan! Merged! |
For anyone that protests mandatory build tools, the compiled, unminified css is ~300 lines, just add the nobuild devil asset to the If you're using propshaft, no other changes required, default or custom layout will resolve # Works for default gem or overridden layout
# app/views/layouts/rails_email_preview/application.html.erb
<%= stylesheet_link_tag 'rails_email_preview/application', 'data-turbolinks-track' => 'reload' %> $ bin/rails assets:reveal
rails_email_preview/favicon.png
rails_email_preview/application.js
rails_email_preview/application.scss
rails_email_preview/application.css
rails_email_preview/_iframe.scss
rails_email_preview/_bootstrap3.sass
rails_email_preview/application.css.map
rails_email_preview/_default.sass If you don't use sass compilers, or it's N/A for your deployment, ie no |
sassc is deprecated. Replacing sassc with dart-sass is the simplest and most straightforward methodology to keep using sass. The gem dartsass-sprockets provides a drop-in replacement implementing almost everything that sassc-rails offered utilizing the same namespace and method signatures.
There are several deprecation errors that needs to be addressed with the newer version of sass, but it would be good to upgrade to the latest version of the library.
These errors can be addressed in a future PR.
Deprecation errors: