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

    1. pugs: Array
      1. name: string

        the name that will be used to indentify this template

      2. pug: string

        the Pug template string

      an array of pug objects with the properties above

    2. directory: string

      The directory that will be set to the cwd when pug.compileClient is called. This effects how includes are interpreted.

    3. options: Object
      1. pug: string (default: `pug`)

        the name of the function

      2. module: boolean (default: false)

        whether or not the function will be built as an exportable ES module

      3. options: Object
        1. filename: string (default: `Pug`)
        2. 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)

    1. name: string

      value of the pug object passed into pugClient

    2. locals: boolean

      the locals

    3. string: boolean

      return a string of HTML instead of a DocumentFragment

    Returns: DocumentFragment | string

    a DocumentFragment containing the rendered Pug template or a string of the rendered Pug template

2019-10-30T20:02:34.057Z