Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Slab.Command
provides a command line interface for the Slab program.
Commands and options are defined by parsers written using the
optparse-applicative
library.
The implementation of each command can be found in the Slab.Run module.
Synopsis
- data Command
- data CommandWithPath
- data RenderMode
- data ParseMode
- data RunMode
- parserInfo :: ParserInfo Command
Documentation
Build FilePath RenderMode RunMode FilePath | |
Watch FilePath RenderMode RunMode FilePath | |
Serve FilePath FilePath | |
ReportPages FilePath | |
ReportHeadings FilePath | |
Generate FilePath | Generate code. Only Haskell for now. |
CommandWithPath FilePath ParseMode CommandWithPath |
data CommandWithPath Source #
Commands operating on a path.
Render RenderMode RunMode | |
Execute Bool RunMode | If True, simplify the evaluated AST. |
Evaluate Bool | If True, simplify the evaluated AST. |
Parse | |
Classes | List the classes used in a template. TODO Later, we want to list (or create a tree) of extends/includes. |
Fragments (Maybe Text) | List the fragments used in a template. If a name is given, extract that definition. |
ParseShallow | Don't process include statements. |
ParseDeep | Process the include statements, creating a complete template. |
RunNormal | A failing external command fails the template. |
RunPassthrough | A failing external command doesn't fail the template and its output is rendered in the template. |