herringbone: A library for compiling and serving static web assets.

[ library, mit, web ] [ Propose Tags ]

A library for compiling and serving static web assets. For more information, please see https://github.com/hdgarrood/herringbone.

[Skip to Readme]


  • Web
    • Web.Herringbone
      • Internal
        • Web.Herringbone.Internal.BuildAsset
        • Web.Herringbone.Internal.Configuration
        • Web.Herringbone.Internal.FindAsset
        • Web.Herringbone.Internal.GetBuildMapping
        • Web.Herringbone.Internal.Types
        • Web.Herringbone.Internal.Utils
      • Preprocessor
        • Web.Herringbone.Preprocessor.CoffeeScript
        • Web.Herringbone.Preprocessor.Sass
        • Web.Herringbone.Preprocessor.StdIO


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.1.0, 0.1.1
Dependencies base (>=4.5 && <5), bytestring, containers, directory, http-types, mtl, old-locale, process, process-listlike, system-fileio, system-filepath, text, time, transformers, unix-compat [details]
License MIT
Author Harry Garrood
Maintainer harry@garrood.me
Category Web
Source repo head: git clone https://github.com/hdgarrood/herringbone
Uploaded by hdgarrood at 2014-07-22T08:15:53Z
Distributions NixOS:0.1.1
Downloads 5985 total (40 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2015-05-31 [all 6 reports]

Readme for herringbone-0.1.0

[back to package description]


herringbone is a Haskell library for compiling and serving web assets. It aims to make it dead simple to create a 'Network.Wai.Middleware' or 'Network.Wai.Application' which deals with all of your static assets, including preprocessing for languages like Fay, CoffeeScript, Sass, and LESS.

It takes most of its inspiration from the Ruby library, Sprockets, hence the name.



How to use it

import Web.Herringbone

fay, sass :: PP

hb = Herringbone
hb = herringbone
    ( addSourceDir "assets"
    . setDestDir   "compiled_assets"
    . addPreprocessors [fay, sass]

-- You can now access assets programmatically
asset <- findAsset hb (fromJust . makeLogicalPath $ ["application.js"])

-- Or serve them with a Wai application
app = toApplication hb

For more information, go and look at the documentation on Hackage!