what is the best way to use sass in a sinatra application?

Viewed 145

I'm writing a small Sinatra project, using rack and a Gemfile for hosting on Heroku. In order to use sass, I wanted to add gem 'sass', '~> 3.7', '>= 3.7.4' to my Gemfile and then add this to config.ru

require 'sass/plugin/rack'
use Sass::Plugin::Rack

I turns out that the sass gem is deprecated, as per this information: https://github.com/sass/ruby-sass, saying we should use libsass . That would mean that I need to add gem 'sassc', '~> 2.4' to the Gemfile ... I haven't figured out yet how and where add this line so my Sinatra app knows is should use libsass - any help would be much appreciated:

SassC::Engine.new(sass, style: :compressed).render

Now, it turns out that libsass is also deprecated, and the Sass blog recommends using dart sass as per this post https://sass-lang.com/blog/libsass-is-deprecated. I didn't find any information (yet) on how to implement dart sass in a ruby project, or Sinatra specifically.

So now I'm puzzled. What to use and how?

0 Answers
Related