slab-0.0.3.0: A programmable markup language to generate HTML
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Documentation

data CommandWithPath Source #

Commands operating on a path.

Constructors

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.

data ParseMode Source #

Constructors

ParseShallow

Don't process include statements.

ParseDeep

Process the include statements, creating a complete template.

data RunMode Source #

Constructors

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.