vue-easter-egg-trigger
Advanced tools
Comparing version 0.1.20 to 0.1.21
{ | ||
"name": "vue-easter-egg-trigger", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"description": "This packages makes it nice and easy to add Easter Egg triggers to your Vue site.", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -14,7 +14,7 @@ import EasterEggTriggerCore from './EasterEggTriggerCore'; | ||
Vue.prototype.$easterEgg = function(eggOptions) { | ||
EasterEggTriggerCore.init(EasterEggTrigger.options, eggOptions); | ||
EasterEggTriggerCore.init(Vue, EasterEggTrigger.options, eggOptions); | ||
}; | ||
Vue.prototype.$easterEggTrigger = function(eggOptions) { | ||
EasterEggTriggerCore.init(EasterEggTrigger.options, eggOptions); | ||
EasterEggTriggerCore.init(Vue, EasterEggTrigger.options, eggOptions); | ||
}; | ||
@@ -21,0 +21,0 @@ }, |
@@ -1,4 +0,5 @@ | ||
import Vue from 'vue'; | ||
// import Vue from 'vue'; | ||
import _ from '@assets/lodash.custom'; | ||
let VueObj = null; | ||
let easterEggs = []; | ||
@@ -29,3 +30,5 @@ | ||
// Initiate Eggs // | ||
init(pluginOptions = {}, eggOptions = {}) { | ||
init(Vue, pluginOptions = {}, eggOptions = {}) { | ||
VueObj = Vue; | ||
// Set Options // | ||
@@ -173,7 +176,7 @@ this.pluginOptions = pluginOptions; | ||
new Vue().$bus.$emit(`${egg.name}`); | ||
new VueObj().$bus.$emit(`${egg.name}`); | ||
// Auto destroy $bus.$on // | ||
if (egg.destroyBus) { | ||
new Vue().$bus.$off(`${egg.name}`); | ||
new VueObj().$bus.$off(`${egg.name}`); | ||
} | ||
@@ -180,0 +183,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
203906
16
3918