@hackage snaplet-sass0.1.0.0

Sass integration for Snap with request- and pre-compilation.

Sass integration for Snap with request based compilation during development and precompilation in production.

Get started by reading through the README.

Brief overview

Add the snaplet to your App in Application.hs

import Snap.Snaplet.Sass

data App = App [
    _sass :: Snaplet Sass
    ] -- these should be curly braces but haddock doesn't allow it

In Site.hs, add a route for sass to serve from and initialize the snaplet

routes = [..., ("/sass", with sass sassServe)]

app :: SnapletInit App App
app = makeSnaplet "app" "A snaplet example application." Nothing $ do
  s <- nestSnaplet "sass" sass initSass
return $ App s

Now add your Sass files to snaplets/sass/src and they'll be served at /sass/FILE.css. Take note that the .sass or .scss extension will be replaced with .css.