From ad722c478c25e14d0aea7a2ac2fe12e2e089fed6 Mon Sep 17 00:00:00 2001 From: Cory Robinson Date: Thu, 8 Jun 2017 12:53:58 -0700 Subject: [PATCH] fix(): npm distro with a .npmignore file BREAKING CHANGE: no longer distributed to npm with a source map build --- .npmignore | 46 ++++++++++++++++++++++++++++++++++++ mixin.js | 68 ------------------------------------------------------ 2 files changed, 46 insertions(+), 68 deletions(-) create mode 100644 .npmignore delete mode 100644 mixin.js 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;