rib-0.4.1.0: Static site generator using Shake

Safe HaskellNone
LanguageHaskell2010

Rib.App

Description

CLI interface for Rib.

Typically you would call run passing your Shake build action.

Synopsis

Documentation

data App Source #

Application modes

The mode in which to run the Rib CLI

Constructors

Generate

Generate static files once.

Fields

WatchAndGenerate

Watch for changes in the input directory and run Generate

Serve

Run a HTTP server serving content from the output directory

Fields

Instances
Eq App Source # 
Instance details

Defined in Rib.App

Methods

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

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

Data App Source # 
Instance details

Defined in Rib.App

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> App -> c App #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c App #

toConstr :: App -> Constr #

dataTypeOf :: App -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c App) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c App) #

gmapT :: (forall b. Data b => b -> b) -> App -> App #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> App -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> App -> r #

gmapQ :: (forall d. Data d => d -> u) -> App -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> App -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> App -> m App #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> App -> m App #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> App -> m App #

Show App Source # 
Instance details

Defined in Rib.App

Methods

showsPrec :: Int -> App -> ShowS #

show :: App -> String #

showList :: [App] -> ShowS #

run Source #

Arguments

:: FilePath

Directory from which source content will be read.

NOTE: This should ideally *not* be `"."` as our use of watchTree (of runWith) can interfere with Shake's file scaning.

-> FilePath

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 :: FilePath -> FilePath -> Action () -> App -> IO () Source #

Like run but with an explicitly passed App mode