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 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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