Skip to content

Commit

Permalink
Alter the config to pass a --quiet-deps flag (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jukra authored Dec 29, 2024
1 parent 8be9431 commit fd5e5e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ After adding this config line, you may need to clear your assets cache
Note these source maps are *inline* and will be appended to the compiled
`application.css` file. (They will *not* generate additional files.)

## Silencing Deprecation Warnings That Come From Dependencies

To silence deprecation warnings during compilation that come from dependencies, add the following configuration to your `application.rb` file:

```ruby
# config/environments/development.rb
config.sass.quiet_deps = true
```

## Alternatives

* [dartsass-rails](https://github.com/rails/dartsass-rails): The Rails organization
Expand Down
3 changes: 3 additions & 0 deletions lib/sassc/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class Railtie < ::Rails::Railtie
# Display line comments above each selector as a debugging aid
config.sass.line_comments = true

# Silence deprecation warnings during compilation that come from dependencies
config.sass.quiet_deps = false

# Set the default stylesheet engine
# It can be overridden by passing:
# --stylesheet_engine=sass
Expand Down
1 change: 1 addition & 0 deletions lib/sassc/rails/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def call(input)
load_paths: input[:environment].paths,
functions: @functions,
importer: @importer_class,
quiet_deps: ::Rails.application.config.sass.quiet_deps,
sprockets: {
context: context,
environment: input[:environment],
Expand Down

0 comments on commit fd5e5e9

Please sign in to comment.