slim-template / slim

Slim is a template language whose goal is to reduce the syntax to the essential parts without becoming cryptic.
https://slim-template.github.io
MIT License
5.29k stars 500 forks source link

Support dart-sass (sass-embedded gem) #931

Closed ntkme closed 10 months ago

ntkme commented 10 months ago

This PR is another attempt of #895 and #889.

sass-embedded has already been adopted by dartsass-rails, haml, jekyll, nanoc, sinatra, tilt. However, slim was left out due to disagreement over what is the interface contract between slim, tilt, and sass-embedded in #895. There are two points I want to clarify for that:

  1. The tilt API has never guarantee what argument it takes, it is effectively a passthrough tilt_engine.new(...) -> SassEngine.new(...).
  2. Dart Sass (sass-embedded) is a huge breaking change, and it has a redesigned API which is completely different from Ruby Sass.

Since the maintainer of this project does not like the idea of feature detection in the previous PR, this PR implement the next best thing possible. It simply removes the unsupported cache option from the default options. - This is what haml does and nobody complains, so I think it should be fine.