express-vue

Vue rendering engine for Express.js. Use .Vue files as templates using streams

OTHER License

Downloads
1K
Stars
1.3K
Committers
16

Bot releases are visible (Hide)

express-vue -

Published by danielcherubini almost 8 years ago

  • Adds Support for Script and Style in META object
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...
        // ...
    ],
}
express-vue -

Published by danielcherubini almost 8 years ago

  • Updated dependencies to latest
  • Minor text fixes ..lol
express-vue - Refactor and Meta Tags

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

express-vue - v.2.0.5

Published by danielcherubini almost 8 years ago

  • Updated to use require-from-string
express-vue - v2.0.4

Published by danielcherubini almost 8 years ago

  • Speeds up processing vue components
  • Adds more security
  • Fixed bug with SSR template not being sent with final HTML
  • Minor text fixes (lol)

Huge thanks to @eirslett for his help with amazing es6 lambda functions.

express-vue - ES6

Published by danielcherubini about 8 years ago

  • Now in ES6
express-vue - Refactored Project

Published by danielcherubini about 8 years ago

  • Refactored project to take in a root layout
Package Rankings
Top 3.12% on Npmjs.org