module Devel.CmdArgs
( cmdArgs
, CmdArgs (..)
) where
import Options.Applicative
data CmdArgs = CmdArgs
{ buildFile :: FilePath
, runFunction :: String
, isReverseProxy :: Bool
} deriving (Show, Eq)
cmdArgs :: Parser CmdArgs
cmdArgs = CmdArgs
<$> strOption
(long "path"
<> short 'p'
<> value "Application.hs"
<> metavar "FILEPATH"
<> help "The file with the function you want to run. Default is `Application.hs`.")
<*> strOption
(long "function"
<> short 'f'
<> value "develMain"
<> metavar "FUNCTION"
<> help "The function you want run. Default is `develMain`.")
<*> flag True False
(long "no-reverse-proxy"
<> short 'r'
<> help "use `-r` to disable reverse proxying." )