diff options
Diffstat (limited to 'lib/Hakyll')
-rw-r--r-- | lib/Hakyll/Main.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Hakyll/Main.hs b/lib/Hakyll/Main.hs index 6332da1..5abf3a7 100644 --- a/lib/Hakyll/Main.hs +++ b/lib/Hakyll/Main.hs @@ -7,6 +7,9 @@ module Hakyll.Main , hakyllWith , hakyllWithArgs , hakyllWithExitCode + , hakyllWithExitCodeAndArgs + , Options(..) + , Command(..) ) where @@ -94,20 +97,32 @@ invokeCommands args conf check logger rules = -------------------------------------------------------------------------------- +-- | The parsed command-line options. data Options = Options {verbosity :: Bool, optCommand :: Command} deriving (Show) +-- | The command to run. data Command = Build + -- ^ Generate the site. | Check {internal_links :: Bool} + -- ^ Validate the site output. | Clean + -- ^ Clean up and remove cache. | Deploy + -- ^ Upload/deploy your site. | Preview {port :: Int} + -- ^ [DEPRECATED] Please use the watch command. | Rebuild + -- ^ Clean and build again. | Server {host :: String, port :: Int} + -- ^ Start a preview server. | Watch {host :: String, port :: Int, no_server :: Bool } + -- ^ Autocompile on changes and start a preview server. deriving (Show) +{-# DEPRECATED Preview "Use Watch instead." #-} + optionParser :: Config.Configuration -> OA.Parser Options optionParser conf = Options <$> verboseParser <*> commandParser conf where |