summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-19 20:42:16 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-19 20:42:16 +0100
commit715387756e57b539e29d036515e047cdf5d264ba (patch)
tree2221ca421c0a5abf4a2c5f8cda14c5582f243b3b /src/Text
parent0ba0eac8d96c11d13163c7ec184392513de7ca77 (diff)
downloadhakyll-715387756e57b539e29d036515e047cdf5d264ba.tar.gz
Made hakyll function backward-compatible. Version bump.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Hakyll.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Text/Hakyll.hs b/src/Text/Hakyll.hs
index 5c2fbd5..c0486e7 100644
--- a/src/Text/Hakyll.hs
+++ b/src/Text/Hakyll.hs
@@ -1,6 +1,7 @@
module Text.Hakyll
( defaultHakyllConfiguration
, hakyll
+ , hakyllWithConfiguration
) where
import Control.Monad.Reader (runReaderT)
@@ -18,9 +19,13 @@ defaultHakyllConfiguration = HakyllConfiguration
{ additionalContext = M.empty
}
--- | Main function to run hakyll.
-hakyll :: HakyllConfiguration -> Hakyll () -> IO ()
-hakyll configuration buildFunction = do
+-- | Hakyll with a default configuration.
+hakyll :: Hakyll () -> IO ()
+hakyll = hakyllWithConfiguration defaultHakyllConfiguration
+
+-- | Main function to run hakyll with a configuration.
+hakyllWithConfiguration :: HakyllConfiguration -> Hakyll () -> IO ()
+hakyllWithConfiguration configuration buildFunction = do
args <- getArgs
case args of ["build"] -> build'
["clean"] -> clean