Skip to content
This repository has been archived by the owner on Sep 8, 2019. It is now read-only.

millette/lodash-vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
})