0.2.0 • Published 7 years ago

lodash-vision v0.2.0

Weekly downloads
2
License
AGPL-3.0
Repository
github
Last release
7 years ago

lodash-vision

Build Status Coverage Status Dependency Status

Lodash template engine for use with visionary (hapi).

Lodash-vision let's you configure visionary to use lodash templates with hapi.

visionary is used to configure a views engine when using rejoice (the hapi CLI) or glue. This plugin allows configuring the views manager from a manifest which is a plain JSON file and cannot contain calls to server.views() or require the rendering engine.

Usage example

server.register(require(['vision']))
  .then(() => {
    server.views({
      engines: { html: require('lodash-vision') },
      path: 'templates',
      partialsPath: 'templates/partials',
      helpersPath: 'templates/helpers',
      isCached: true
    })
    return server.start(() => {
      console.log('\nStarted the web server on port ' + server.info.port)
    })
  })
  .catch(console.error)
})