| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Slab.Command
Description
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
- parserInfo :: ParserInfo Command
Documentation
Constructors
| Build FilePath RenderMode FilePath | |
| Watch FilePath RenderMode FilePath | |
| Serve FilePath FilePath | |
| Report FilePath | |
| Generate FilePath | Generate code. Only Haskell for now. |
| CommandWithPath FilePath ParseMode CommandWithPath |
data CommandWithPath Source #
Commands operating on a path.
Constructors
| Render RenderMode | |
| Execute | |
| 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. |
data RenderMode Source #
Constructors
| RenderNormal | |
| RenderPretty |
Constructors
| ParseShallow | Don't process include statements. |
| ParseDeep | Process the include statements, creating a complete template. |