govuk-design-system
govuk-design-system copied to clipboard
Silence deprecation warnings raised by Sass while building the website
What
Silence the various deprecation warnings raised by Sass while the website is built and create an issue to address it in the future.
Why
Being reminded of all the deprecated features our code still uses adds a lot of noise to the build output, reducing our chances to spot actual issues or new deprecations or making it harder to spot our own logs. As addressing the deprecations are pieces of work in their own right, we'll want to record to actually address the deprecation in an issue so we don't forget and can hopefully tackle it ahead of Sass removing the deprecated feature.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
- [ ] We've decided how to address the situation with
sass-export - [ ] Deprecation warnings have been removed and issues created
Interestingly, Sass files are compiled twice:
- once by the
@metalsmith/sassplugin (that's the obvious one you'd expect) - once when gathering the colour palette injected as global metadata, through
sass-export.
Unfortunately, the latter doesn't allow to pass options to the Sass compiler , so we'll need to figure a route for that. We may want to revisit how we extract the palette, maybe using postcss's AST instead to read the values we're after 🤔 (or use patch-package to adapt the library as it suits us, possibly before proposing a PR to it)
In the meantime npm start 2>/dev/null gets rid of the warning noise