vue-as-services
v1.0.2
Published
Vue JS Biasly Created To Simplify Vue JS and manage larger scale front-end applications
Downloads
17
Maintainers
Readme
vue-as-services
Vue JS Biasly Created To Simplify Vue JS and manage larger scale front-end applications
Usage
- Import
import { CreateVueServiceContainer } from 'vue-as-services'
- Create vue container
window.Container = VueServiceContainer(DEFAULT.options, DEFAULT.container)
- Provide Register callbacks
Container.registering(({ container, Vue }) => {
const $Event = new Vue()
$Event.listen = $Event.$on
$Event.fire = $Event.$emit
$Event.listenOnce = $Event.$once
$Event.forget = $Event.$off
Vue.prototype['$Event'] = $Event
container['$Event'] = $Event
})
- Provide booting callbacks
Container.booting(({ container, Vue }) => {
Vue.component('hello-world', {
data: () => ({ title: 'hello world' })
})
})
- Launch app with defined root instance
Container.launch({
el: '#app',
name: 'vue-services-application',
})