lodash-vision

Lodash template engine for use with visionary (hapi).

Usage no npm install needed!

<script type="module">
  import lodashVision from 'https://cdn.skypack.dev/lodash-vision';
</script>

README

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