0.4.1 • Published 7 years ago

hypervue v0.4.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

hyperVue

Use tagged template string in Vue.js

Original Project vs Fork

This project is a fork of egoist's vue-html. In egoist's vue-html, the key logic is bound to Vue (using Vue.use(HTML)).
In this version, vue-html is a function which takes in createElement.

Install

$ npm install --save hypervue

Usage

import Vue from 'vue'
import hyperVue from 'hypervue'

new Vue({
  el: '#app',
  data: {
    count: 0
  },
  methods: {
    handleClick() {
      this.count++
    }
  },
  render(createElement) {
    const html = hyperVue(createElement);
    return hyperVue`
      <button onClick=${this.handleClick}>${this.count}</button>
    `
  }
})

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

License

MIT © EGOIST