diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e598b9a --- /dev/null +++ b/.npmignore @@ -0,0 +1,46 @@ +coverage/ +dev/ +node_modules/ +src/ +test/ + +.eslintrc +.travis.yml +rollup.config.js +yarn.lock + +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules + +coverage/ +doc/ +bower_components/ + +*.iml +.idea/ + +*.png +CONTRIBUTING.md +favicon.ico +circle.yml +bower.json +.bowerrc +Gruntfile.js +*.start.js +karma.conf.js +junit/ +test/ +lib/ +src/ \ No newline at end of file diff --git a/mixin.js b/mixin.js deleted file mode 100644 index 697f2ae..0000000 --- a/mixin.js +++ /dev/null @@ -1,68 +0,0 @@ -/********************************************** - * This is event-sky built as a React mixin * * - * * - * Description * - * We first check if the window object is * - * available and has our event module * - * iniitialized, if it's not then we * - * iniitializ or then check GLOBAL because * - * we might be on server/node or other env * - * * - ***********************************************/ - - -// Exposed methods -// var API = { -// init : init, -// // subscribe to an event -// on : on, -// // subscribe to be triggered before other -// before : before, -// // subscribe to be triggered after other -// after : after, -// // will only listen and fire once to an event -// once : once, -// // unsubscribe to an event -// off : off, -// // trigger an event -// trigger : trigger, -// // list of events -// events : getEventList, -// // dev -// dev : { eventStack : eventStack, eventMap : eventStackIdMap } -// }; -// -// // expose to global scope -// GLOBAL_SCOPE === 'window' ? window[namespace] = API : global[namespace] = API; - - - - -var namespace; - -// check if we're in a browser environment -if (typeof(window)!=='undefined') { - if (!window.eventSky) { - require('event-sky'); - if (!window.eventSky) { - throw new Error('eventSky is not initialized and cannot be found with "require(\'event-sky\')"'); - } - } - namespace = window.eventSky; -} -// assume we're serverSide, phonegap or other environment -else { - // id server side (node), GLOBAL/global will be available - // if it's not, we instantiate a GLOBAL - var GLOBAL = GLOBAL || global || {}; - - if (!GLOBAL.eventSky) { - require('event-sky'); - if (!GLOBAL.eventSky) { - throw new Error('eventSky is not initialized and cannot be found with "require(\'event-sky\')"'); - } - } - namespace = GLOBAL.eventSky; -} - -module.exports = namespace;