Popularity
3.2
Declining
Activity
0.0
Stable
3
1
4

Monthly Downloads: 6
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web     Snap     Snaplet    
Latest version: v0.1.0.0

snaplet-sass alternatives and similar packages

Based on the "snaplet" category.
Alternatively, view snaplet-sass alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of snaplet-sass or a related project?

Add another 'snaplet' Package

README

snaplet-sass

[Changelog](CHANGELOG.md)

snaplet-sass integrates Snap with Sass.

Features

  • Compile and serve sass files on request, no need to restart the snap server.
  • Production mode to pre-compile all sass files.
  • Outputs sourcemaps to make debugging generated CSS easier.
  • Writes CSS to disk to allow reading the generated source.

Example Usage

Site.hs:

import Snap.Snaplet.Sass

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 { _sass = s }

Application.hs:

import Snap.Snaplet.Sass

data App = App { _sass :: Snaplet Sass }

makeLens ''App

Now run your application and try requesting a Sass file.

A snaplet config file will be generated at snaplets/sass/devel.cfg the first time your application initializes the snaplet. The defaults are the recommended ones for development.

Place your .sass or .scss files in snaplets/sass/src. Note that a default devel.cfg will not be created if you have already created the sass directory. If this happens to you, move snaplets/sass, start your application, and then move the files back into snaplets/sass.

Any requests to the specified directory (in this case /sass/) will compile the appropriate Sass file and serve it.

Thanks

This borrows hugely from snaplet-fay.