vue-as-services

1.0.2 • Public • Published

vue-as-services

Vue JS Biasly Created To Simplify Vue JS and manage larger scale front-end applications

Usage

  1. Import
import { CreateVueServiceContainer } from 'vue-as-services'
  1. Create vue container
window.Container = VueServiceContainer(DEFAULT.options, DEFAULT.container)
  1. 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
})
  1. Provide booting callbacks
Container.booting(({ container, Vue }) => {
   Vue.component('hello-world', {
	 data: () => ({ title: 'hello world' })
   })
})
  1. Launch app with defined root instance
Container.launch({
 	el: '#app',
	name: 'vue-services-application',
})

/vue-as-services/

    Package Sidebar

    Install

    npm i vue-as-services

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    495 kB

    Total Files

    16

    Last publish

    Collaborators

    • zhorton999