mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 01:52:11 +03:00
01a44e436d
* Big refactor in process * remove unnecessary functions from the prelude * remove comments
31 lines
612 B
Haskell
31 lines
612 B
Haskell
module Commands.Dev.Doc where
|
|
|
|
import Juvix.Prelude hiding (Doc)
|
|
import Options.Applicative
|
|
|
|
data DocOptions = DocOptions
|
|
{ _docOutputDir :: FilePath,
|
|
_docOpen :: Bool
|
|
}
|
|
|
|
makeLenses ''DocOptions
|
|
|
|
parseDoc :: Parser DocOptions
|
|
parseDoc = do
|
|
_docOutputDir <-
|
|
option
|
|
str
|
|
( long "output-dir"
|
|
<> metavar "DIR"
|
|
<> value "doc"
|
|
<> showDefault
|
|
<> help "html output directory"
|
|
<> action "directory"
|
|
)
|
|
_docOpen <-
|
|
switch
|
|
( long "open"
|
|
<> help "open the documentation after generating it"
|
|
)
|
|
pure DocOptions {..}
|