@twoavy/vue-utils

0.0.11 • Public • Published

@twoavy/vue-utils

Installation

yarn add @twoavy/vue-utils

Usage

import TwoavyUtils from '@twoavy/utils'

in main.js

Vue.use(TwoavyUtils, {
    url: 'http://twoavy.test',
    client_id: 13,
    client_secret: 'b2834basdk8asd278dahb49urf39da',
    logging: true,
    device_id: 5,
    showErrorsOnScreen: true, // directly handle errors and show them on-screen
    ready: initVue, // callback when axios is ready to use
    retries: 3 // number of axios retries before failing
})

// init Vue AFTER axios is set up
function initVue() {
    new Vue({
        store,
        render: h => h(App)
    }).$mount('#app')

in components

// make api calls
this.$axios.get('/dostuff')

// log events
this.$twoavy.log('log_type', 'log_message')

Readme

Keywords

none

Package Sidebar

Install

npm i @twoavy/vue-utils

Weekly Downloads

0

Version

0.0.11

License

MIT

Unpacked Size

10.8 kB

Total Files

7

Last publish

Collaborators

  • twoavy-nb
  • twoavy-ms
  • twoavy-mh
  • twoavy-mm