diff --git a/dispatchers/action.js b/dispatchers/action.js index 8adebd8..2cc86c8 100644 --- a/dispatchers/action.js +++ b/dispatchers/action.js @@ -1,11 +1,16 @@ 'use strict'; +/** + * @module action + */ + + awesome.requireScript(`${awesome.bower}event-pubsub/event-pubsub-browser.js`); awesome.requireScript(`${awesome.path}dispatchers/store.js`); ( function(){ - const events=new pubsub; - let store=null; + const events = new window.EventPubSub(); + let store = null; function init(e){ if(e && e.detail!==`${awesome.path}dispatchers/store.js`){ diff --git a/dispatchers/store.js b/dispatchers/store.js index b0dfd37..b016210 100644 --- a/dispatchers/store.js +++ b/dispatchers/store.js @@ -1,10 +1,13 @@ 'use strict'; +/** + * @module dispatchers/store + */ awesome.requireScript(`${awesome.bower}event-pubsub/event-pubsub-browser.js`); ( function(){ - const events=new pubsub; + const events=new window.EventPubSub(); /** * awesome dispatcher for stores, uses event-pubsub diff --git a/stores/store.js b/stores/store.js index b4b70a0..1c21100 100644 --- a/stores/store.js +++ b/stores/store.js @@ -1,5 +1,9 @@ 'use strict'; +/** + * @module store + */ + awesome.requireScript(`${awesome.path}dispatchers/store.js`); awesome.requireScript(`${awesome.path}stores/constants.js`); awesome.requireScript(`${awesome.bower}event-pubsub/event-pubsub-browser.js`); @@ -20,8 +24,8 @@ awesome.requireScript(`${awesome.bower}js-message/js-message-vanilla.js`); */ class Store{ constructor(){ - const events=new pubsub; - this._events=events; + const events = new window.EventPubSub(); + this._events = events; Object.defineProperties( this, {