Skip to content

Commit

Permalink
Alter the config to pass a --quiet-deps flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jukra committed Sep 24, 2024
1 parent 8be9431 commit 406b252
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ 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

To silence deprecation warnings during compilation, 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
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 406b252

Please sign in to comment.