Permalink
Browse files

compile coffee script, run js & css through yui-compress (beats hakyl…

…l's compressCssCompiler, though is much slower)
  • Loading branch information...
1 parent dca936b commit e5e6dcc4fb4f25ecfe6b811614090b8efde4f14c Andy Irving committed Oct 2, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/site.hs
View
@@ -126,17 +126,17 @@ renderRevision rl = renderHtml $ H.tr $ do
main :: IO ()
main = hakyll $ do
- match "files/*" $ do
+ let static = route idRoute >> compile copyFileCompiler
+ mapM_ (`match` static ) ["files/**", "js/lib/*", "images/**"]
+ match "js/*.js" $ do
route idRoute
- compile copyFileCompiler
- match "js/**" $ do
- route idRoute
- compile copyFileCompiler
- -- apply unixFilter to compile coffeescript & minify js
- -- Compress CSS
+ compile $ getResourceString >>> unixFilter "yui-compressor" ["--type", "js"]
+ match "js/*.coffee" $ do
+ route $ setExtension "js"
+ compile $ getResourceString >>> unixFilter "coffee" ["--compile", "-s"] >>> unixFilter "yui-compressor" ["--type", "js"]
match "css/*" $ do
route idRoute
- compile compressCssCompiler
+ compile $ getResourceString >>> unixFilter "yui-compressor" ["--type", "css"]
match "about/*" $ do
route $ setExtension ".html"

0 comments on commit e5e6dcc

Please sign in to comment.