xivapi / vue-xivtooltips

A set of vue components to fetch and display data from xivapi
Apache License 2.0
16 stars 8 forks source link

First pass at adding an install function #8

Closed ghost closed 4 years ago

ghost commented 4 years ago

This adds an install method and is hopefully the start of simplifying the usage.

Since Levi's use case is not in a full vue app, I added a special option that deals with the auto-lowercasing of html tags in browsers:

Vue.use(Vuex)
Vue.use(VueXIVTooltips, {
    webTemplateOnly: true,
})

let vm = new Vue({
    el: '#content',
})

This has exposed another issue in the templating where I may have to rewrite the components to use a custom store instead of overriding the vue object store. Not a huge deal, but outside the scope of this PR.

Taking feedback on the name of the webTemplateOnly because it sounds misleading (perhaps inlineTemplate?).