Replace sprockets-sass with dartsass-sprockets#2649
Replace sprockets-sass with dartsass-sprockets#2649spamguy wants to merge 4 commits intofreeCodeCamp:mainfrom
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| # SCSS wrapped in ERB templates must be compiled manually. | ||
| compile_scss_erb | ||
|
|
There was a problem hiding this comment.
dartsass-sprockets seems to handle .sass.erb: https://github.com/tablecheck/dartsass-sprockets/blob/d0fefd07b631c1326907bcf4fb811fc3a462acdd/lib/sassc/rails/importer.rb#L55-L57
Not sure if it is of any help?
There was a problem hiding this comment.
I'm not sure how to activate it then. It isn't automatic behavior, at least. Documentation goes into great detail about Rails' asset pipeline without discussing Rails-less envs at all.
There was a problem hiding this comment.
@simon04 The importers you linked to are Rails-directed and I don't think they can be used for our purposes. Given there are exactly two .scss.erb files (environment.scss.erb could probably be rewritten, so possibly one file), my approach is probably fine.
This PR modernizes the Sass compilation pipeline by migrating from the deprecated
sprockets-sassgem todartsass-sprockets. Closes #2214 and #2450.After merging, the way should be clear to upgrade various other gems previously blocked by Sass.
Highlights
sprocketsto v4sprockets-sasswithdartsass-sprocketsin the build pipeline.scss.erbfiles to the Thor task.dart-sassdoesn't handle ERB preprocessing automatically, so this step is now explicit in the build process@importstatements in favor of@useTesting Notes
There should be no user-facing impact. I did my utmost to confirm this through smoke tests, env comparisons, unit tests, etc. Verifying the quality of a production build on my li'l dev machine is possibly beyond my understanding, but will gladly take any advice.