A static site generator written in Haskell
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223
  1. module CLI
  2. ( argParser
  3. , Config(..)
  4. )
  5. where
  6. import System.Console.ArgParser
  7. data Config =
  8. Build FilePath Bool
  9. | New String
  10. deriving (Show)
  11. argParser :: IO (CmdLnInterface Config)
  12. argParser = mkSubParser
  13. [ ( "build"
  14. , mkDefaultApp
  15. (Build `parsedBy` optPos "." "directory" `andBy` boolFlag "drafts")
  16. "build"
  17. )
  18. , ("new", mkDefaultApp (New `parsedBy` reqPos "name") "new")
  19. ]