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

Generate custom install() for use with Vue.use(VueXivTooltips) #4

Closed ghost closed 4 years ago

ghost commented 4 years ago

Would be nice to do something like:

Vue.use(VueXivtooltips.config({
    foo: bar,
    baz: biz,
})

and have the .config function generate an object that has install() built in.

ghost commented 4 years ago

Some inroads made; no PR yet. Since Levi's use case isn't to use in a vue context, I've had to make an option for it:

    const webTemplateOnly = options.webTemplateOnly || false

    for (const key in components) {
        const keystr = webTemplateOnly ? key.toLowerCase() : key
        registerComponent(Vue, keystr, components[key])
    }

May or may not be the correct way to handle this, however.

ghost commented 4 years ago

Inroads being made with PR #8.

ghost commented 4 years ago

PR #8 merged. Gotta take some risks sometimes.