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

Alter the config to pass a --quiet-deps flag #25

Closed
nimmolo opened this issue Mar 22, 2024 · 4 comments · Fixed by #27
Closed

Alter the config to pass a --quiet-deps flag #25

nimmolo opened this issue Mar 22, 2024 · 4 comments · Fixed by #27

Comments

@nimmolo
Copy link

nimmolo commented Mar 22, 2024

Our app has a ton of SCSS deprecation warnings.

Is there a way to pass the dart-sass build flag to quiet these?
Something like how dartsass-rails has Rails.application.config.dartsass.build_options << " --quiet-deps"

@nimmolo
Copy link
Author

nimmolo commented Mar 22, 2024

Actually, groping in the dark here... I checked out the way config_options is passed in Sprockets::SassCompressor and SassTemplate so I tried just passing the arg like this, and it seems to have worked.

# config/production.rb 
  config.sass.quiet_deps = true

Would you be open to a PR to document this?
Update, it does not work to pass the config. The deprecation warnings are reported unpredictably on compile (as far as I can tell), and I just thought it had silenced them. The gem actually doesn't handle these args, so i'm working on a PR to handle them.

@nimmolo nimmolo changed the title Is there a config to pass the --quiet-deps flag? Document the config to pass the --quiet-deps flag? Mar 22, 2024
@nimmolo nimmolo changed the title Document the config to pass the --quiet-deps flag? Document the config to pass the --quiet-deps flag Mar 22, 2024
@nimmolo nimmolo changed the title Document the config to pass the --quiet-deps flag Document the config to pass a --quiet-deps flag Mar 22, 2024
@johnnyshields
Copy link
Contributor

I'm happy to accept a PR for this.

@nimmolo
Copy link
Author

nimmolo commented May 30, 2024

I'm going to try to enable a config like this.

  # config/production.rb  
  config.sass.quiet_deps = true

It seems the config options for this gem are set in three different places though, and I'm a little confused by that.
I assume this is for compatibility with SassC's API.

Should I focus on one of these instead of the others?

  • /lib/sassc/rails/compressor.rb:9
  • /lib/sassc/rails/railtie.rb:9
  • /lib/sassc/rails/template.rb:26

@nimmolo nimmolo changed the title Document the config to pass a --quiet-deps flag Alter the config to pass a --quiet-deps flag Jun 28, 2024
@jukra
Copy link
Contributor

jukra commented Sep 24, 2024

@nimmolo would you have a chance to test my PR #27? I think the changes are not needed for compressor.rb as it's compressing the css output, not compiling to it.

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 a pull request may close this issue.

3 participants