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

Skip dartsass:build if environment variable SKIP_CSS_BUILD is set. #51

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

natsuokawai
Copy link
Contributor

Hello,

dartsass-rails gem currently runs dartsass:build automatically during assets:precompile.
This behavior is enforced by the code here:

Rake::Task["assets:precompile"].enhance(["dartsass:build"])

However, in some scenarios, it's beneficial to run dartsass:build and assets:precompile separately.

For example, the cssbundling-rails gem offers a way to skip its build process during assets:precompile by setting an environment variable SKIP_CSS_BUILD, as introduced by rails/cssbundling-rails#99.

To align dartsass-rails with this approach, I suggest a similar feature.

@natsuokawai natsuokawai changed the title Skip CSS build if environment variable SKIP_CSS_BUILD is set. Skip dartsass:build if environment variable SKIP_CSS_BUILD is set. Jan 9, 2024
@dhh dhh merged commit 569af9c into rails:main Jul 30, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants