express-vue-renderer
Rendering Engine for turning Vue files into Javascript Objects
Installation
$ npm install --save express-vue-renderer
Usage
Include the library at the top level like so
const ExpressVueRenderer = ;
The library returns a function called renderer
It takes 3 params, 2 required and one optional.
ExpressVueRenderer
The promise returns an object called app
, or an error
ExpressVueRenderer ;
VueOptions
rootPath: path viewsPath: 'vueFiles' componentsPath: 'vueFiles/components' layout: start: '<body><div id="app">' end: '</div></body>' vue: head: meta: property: 'og:title' content: 'Page Title' name: 'twitter:title' content: 'Page Title' script: 'https://unpkg.com/vue@2.3.4/dist/vue.js' name: 'viewport' content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' data: thing: true
License
Apache-2.0 © Daniel Cherubini