From fae29069d4c8a9226e51e3b7ecf9499c1a47b9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 1 Apr 2024 21:36:47 +0200 Subject: [PATCH] Ignore Sass warnings until we update our dependencies We're getting one warning when compiling the assets due to the code we use from font-awesome-sass, and a lot of warnings due to the code we use from foundation. Since these warnings are very annoying, and we get them both when deploying and every time we change an SCSS file in development, we're silencing them. I haven't found the way to pass the `quiet_deps` option to the Sprockets processor, so I'm monkey-patching the Sass engine instead. --- config/initializers/sass.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 config/initializers/sass.rb diff --git a/config/initializers/sass.rb b/config/initializers/sass.rb new file mode 100644 index 000000000..7ab724bf5 --- /dev/null +++ b/config/initializers/sass.rb @@ -0,0 +1,8 @@ +# TODO: remove once we upgrade Foundation and Font Awesome +SassC::Engine.class_eval do + alias_method :original_initialize, :initialize + + def initialize(template, options = {}) + original_initialize(template, options.merge(quiet_deps: true)) + end +end