diff options
author | Eric Stolten <stoltene2@gmail.com> | 2013-08-20 21:59:39 -0400 |
---|---|---|
committer | Eric Stolten <stoltene2@gmail.com> | 2013-08-20 21:59:39 -0400 |
commit | f14f52040a5377dbca229ab34674542148a4868b (patch) | |
tree | 224ab4b4008a31baed9648fa74ad6e33797f869a /src/Hakyll/Main.hs | |
parent | faa90283bfdd13740ebecd91c3f966591d183d79 (diff) | |
download | hakyll-f14f52040a5377dbca229ab34674542148a4868b.tar.gz |
Added a watch command that will continually poll for changes and rebuild them.
Diffstat (limited to 'src/Hakyll/Main.hs')
-rw-r--r-- | src/Hakyll/Main.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Hakyll/Main.hs b/src/Hakyll/Main.hs index 7e50418..efa6d99 100644 --- a/src/Hakyll/Main.hs +++ b/src/Hakyll/Main.hs @@ -49,6 +49,7 @@ hakyllWith conf rules = do Preview _ p -> Commands.preview conf verbosity' rules p Rebuild _ -> Commands.rebuild conf verbosity' rules >>= exitWith Server _ _ -> Commands.server conf (port args') + Watch _ -> Commands.watch conf verbosity' rules -------------------------------------------------------------------------------- @@ -67,6 +68,7 @@ data HakyllArgs | Preview {verbose :: Bool, port :: Int} | Rebuild {verbose :: Bool} | Server {verbose :: Bool, port :: Int} + | Watch {verbose :: Bool} deriving (Data, Typeable, Show) @@ -84,6 +86,7 @@ hakyllArgs = modes , (Rebuild $ verboseFlag def) &= help "Clean and build again" , (Server (verboseFlag def) (portFlag 8000)) &= help "Start a preview server" + , (Watch (verboseFlag def) &= help "Autocompile on changes") ] &= help "Hakyll static site compiler" &= program progName |