All Projects → egoist → vengine

egoist / vengine

Licence: MIT License
Vue template engine.

Programming Languages

javascript
184084 projects - #8 most used programming language

vengine NPM version

NPM downloads CircleCI donate

Install

yarn add vengine

Usage

Currently it depends on Vue, vue-template-compiler and vue-server-renderer, but I do plan to make a standalone template engine that supports Vue template syntax without using these libs.

const vengine = require('vengine')

const template = vengine.compile(`<ul>
  <li v-for="item in list">{{ item }}</li>
</ul>`)

template({
  list: ['foo', 'bar', 'baz']
}).then(html => {
  //=> console.log(html)
  <ul data-server-rendered="true">
    <li>foo</li>
    <li>bar</li>
    <li>baz</li>
  </ul>
})

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

vengine © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @_egoistlily

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].