1
votes

I am trying to set up a Sinatra project to use Sass and Compass for the first time. I downloaded the sample app from https://github.com/chriseppstein/compass-sinatra. App.rb is currently configured properly to compile .sass files automatically, but how do I configure it to look for .scss files instead?

get '/stylesheets/:name.css' do
  content_type 'text/css', :charset => 'utf-8'
  sass(:"stylesheets/#{params[:name]}", Compass.sass_engine_options )
end
1

1 Answers

0
votes

So it turns out to be a simple configuration change from sass() to scss() in line 3

get '/stylesheets/:name.css' do
  content_type 'text/css', :charset => 'utf-8'
  scss(:"stylesheets/#{params[:name]}", Compass.sass_engine_options )
end