Vue rendering engine for Express.js. Use .Vue files as templates using streams
OTHER License
Bot releases are hidden (Show)
head: {
// Meta tags
meta: [
// Scripts
{ script: '/assets/scripts/hammer.min.js' },
{ script: '/assets/scripts/vue-touch.min.js', charset: 'utf-8' },
// Note with Scripts [charset] is optional defaults to utf-8
// ...
// Styles
{ style: '/assets/rendered/style.css' }
{ style: '/assets/rendered/style.css', type: 'text/css' }
{ style: '/assets/rendered/style.css', type: 'text/css', rel: 'stylesheet' }
// Note with Styles, [type] and [rel] are optional...
// ...
],
}
Published by danielcherubini almost 8 years ago
Huge refactor.
Deprecated old object structure you passed into the view through the route..
new object
const viewObject = {
data: {
otherData: 'Something Else'
},
vue: {
meta: {
title: 'Page Title',
head: [
{ property:'og:title' content: 'Page Title'},
{ name:'twitter:title' content: 'Page Title'},
]
},
components: ['myheader', 'myfooter']
}
res.render('main', viewObject);
The new object contains two root objects, vue
and data
.
Everything in data
will be passed into the parent .vue file's data function (REMEMBER: all data must be in functions! as per the vue spec)
Everything in vue
is configuration for vue. Currently available are meta
and components
as above.
Everything in meta.head
array is structured like above its JSON which translates into HTML
Published by danielcherubini almost 8 years ago
Published by danielcherubini almost 8 years ago
Minor text fixes
(lol)Huge thanks to @eirslett for his help with amazing es6 lambda functions.
Published by danielcherubini about 8 years ago
Published by danielcherubini about 8 years ago