pug-client
Exported
pugClient(pugs, directory[, options])
takes an array of pug objects and returns a function that can use all of them on the client
pugs
:Array
name
:string
the name that will be used to indentify this template
pug
:string
the Pug template string
an array of pug objects with the properties above
directory
:string
The directory that will be set to the cwd when
pug.compileClient
is called. This effects how includes are interpreted.options
:Object
pug
:string
(default:`pug`
)the name of the function
module
:boolean
(default:false
)whether or not the function will be built as an exportable ES module
options
:Object
filename
:string
(default:`Pug`
)doctype
:string
(default:`html`
)
the options used with
pug.compileClient
Returns:string
a string of characters that, when evaluated, produces a function, named
pug
by default
Created
pug(name, locals, string)
name
:string
value of the pug object passed into pugClient
locals
:boolean
the
locals
string
:boolean
return a string of HTML instead of a
DocumentFragment
Returns:DocumentFragment
|string
a
DocumentFragment
containing the rendered Pug template or astring
of the rendered Pug template