slightlyoff / cassowary.js

Cassowary/JS, better, faster, future-ready
Other
1.69k stars 107 forks source link

Leaking 'exports' into global #53

Closed d4tocchini closed 10 years ago

d4tocchini commented 10 years ago

When including in a project that also has amd components, exports is getting added to window which prevents modules that check for both commonJS and AMD fail if they look for the existence of exports as does PIXI.js (see https://github.com/the-gss/engine/issues/47).

Also causing problems when loading GSS with Require.js

Source of problem:

// For Node...not that I'm bitter. No no, not at all. Not me. Never...
if (typeof require == "function" &&
    typeof module != "undefined" &&
    typeof load == "undefined") {
  scope.exports = c;
}
// ...well, hardly ever.