-
Notifications
You must be signed in to change notification settings - Fork 26
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
Switch to dartsass-rails
and foreman
, ./bin/dev
#1975
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Our gem `sassc-rails` is not maintained and is not compatible with newer Bootstrap versions, which use newer Sass syntax. TODO: > In your continuous integration pipeline, before running any tests that interact with the browser, make sure to build the Sass files by running: > > ``` bundle exec rails dartsass:build ```
dartsass-rails
dartsass-rails
dartsass-rails
dartsass-rails
and foreman
, bin/dev
dartsass-rails
and foreman
, bin/dev
dartsass-rails
and foreman
, ./bin/dev
@mo-nathan This may clear up the finicky solid queue situation in dev. We could try it either before or after the field slips PR. In either case, we should add this to
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the standard SASS compiler people use. Our current gem
dartsass-sprockets
is sort of a retrofit that allows us to keep building assets withsprockets-rails
.dartsass-rails
seems to be better maintained though, and unlikedartsass-sprockets
it has an option that silences our many Bootstrap-3-related SASS deprecation warnings in CI.It builds assets using the gem
foreman
, which it automatically installs. Switching to this gem unblocks us from retiringsprockets
and switching topropshaft
if we want to.Important
Developers need to change the way we start the local server
First,
gem install foreman
— devs must install locally, but I believe it will install automatically. The docs say it should not be bundled in the Gemfile, and explains why.Then whenever you want to start the dev server, instead of
rails s
, you run./bin/dev
. That's it.Explanation:
./bin/dev
is a script that runsrails s
and startsforeman
. Unlikedartsass-sprockets
,dartsass-rails
does not automatically watch our assets/stylesheets folders for changes. The "watching" is performed byforeman
.Note
In our
.github/ci_rails.yml
, I've added this to build the Sass files before running any tests that interact with the browser:bundle exec rails dartsass:build
It turns out though that
foreman
may be also useful for running asolid_queue
server; specifically if it can stop and start the server on code changes. @mo-nathan and I are finding that solid queue is very finicky about changed code and requires a lot of restarting in dev. I believe we can add a proc to foreman's config so that it will restart solid queue. (We need to confirm that it can detect code changes that are relevant to solid queue, see this post.)