rib-0.8.0.0: Static site generator using Shake
Safe HaskellNone
LanguageHaskell2010

Rib.App

Description

CLI interface for Rib.

Mostly you would only need run, passing it your Shake build action.

Synopsis

Documentation

data Command Source #

Rib CLI commands

Constructors

OneOff 
Generate

Generate the site once.

Fields

  • full :: Bool

    Force a full generation of all files even if they were not modified

Watch

Watch for changes in the input directory and run Generate

Serve

Run a HTTP server serving content from the output directory

Fields

Instances

Instances details
Eq Command Source # 
Instance details

Defined in Rib.App

Methods

(==) :: Command -> Command -> Bool #

(/=) :: Command -> Command -> Bool #

Show Command Source # 
Instance details

Defined in Rib.App

Generic Command Source # 
Instance details

Defined in Rib.App

Associated Types

type Rep Command :: Type -> Type #

Methods

from :: Command -> Rep Command x #

to :: Rep Command x -> Command #

type Rep Command Source # 
Instance details

Defined in Rib.App

type Rep Command = D1 ('MetaData "Command" "Rib.App" "rib-0.8.0.0-inplace" 'False) ((C1 ('MetaCons "OneOff" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Generate" 'PrefixI 'True) (S1 ('MetaSel ('Just "full") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :+: (C1 ('MetaCons "Watch" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Serve" 'PrefixI 'True) (S1 ('MetaSel ('Just "port") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "dontWatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

commandParser :: Parser Command Source #

Commandline parser Parser for the Rib CLI

run Source #

Arguments

:: Path Rel Dir

Directory from which source content will be read.

-> Path Rel Dir

The path where static files will be generated. Rib's server uses this directory when serving files.

-> Action ()

Shake build rules for building the static site

-> IO () 

Run Rib using arguments passed in the command line.

runWith :: Path Rel Dir -> Path Rel Dir -> Action () -> Command -> IO () Source #

Like run but with an explicitly passed Command