hinit-0.2.2: Generic project initialization tool
Safe HaskellNone
LanguageHaskell2010

Hinit.Template

Synopsis

Documentation

data Template Source #

Constructors

Local 
Broken 

Instances

Instances details
Eq Template Source # 
Instance details

Defined in Hinit.Template

Show Template Source # 
Instance details

Defined in Hinit.Template

Generic Template Source # 
Instance details

Defined in Hinit.Template

Associated Types

type Rep Template :: Type -> Type #

Methods

from :: Template -> Rep Template x #

to :: Rep Template x -> Template #

type Rep Template Source # 
Instance details

Defined in Hinit.Template

copyFileFromTemplate Source #

Arguments

:: (Has (Throw MustacheError) sig m, Has (Throw IllformedPath) sig m, Has (Lift IO) sig m, ToMustache ctx) 
=> ctx

Mustache context

-> Path a Dir

Base dir of the template

-> Path b Dir

Base dir of the target

-> Path Rel File

Source file path relative to the template base

-> m () 

Copy a file from template to the corresponding location in the target directory and apply substitution. Note that this function assumes that the parent directory of the target file exists.

copyDirFromTemplate Source #

Arguments

:: (Has (Throw MustacheError) sig m, Has (Throw IllformedPath) sig m, Has (Lift IO) sig m, ToMustache ctx) 
=> ctx

Mustache context

-> Path a Dir

Base dir of the template

-> Path b Dir

Base dir of the target

-> Path Rel Dir

Source dir path relative to the template base

-> m () 

Copy a directory from template to the corresponding location in the target directory and apply substitution. Note that this function assumes that the parent directory of the target directory exists.

initFromTemplate Source #

Arguments

:: (Has (Throw MustacheError) sig m, Has (Throw IllformedPath) sig m, Has (Lift IO) sig m, MonadIO m, ToMustache ctx) 
=> [Pattern]

Ignored files

-> ctx

Mustache context

-> Path a Dir

Base dir of the template

-> Path b Dir

Base dir of the target

-> m () 

Initialize a project from a template

getTemplates :: Has (Lift IO) sig m => m [Template] Source #