add commonJS export in browser environment export

This commit is contained in:
Josh 2014-04-27 12:53:14 -04:00
parent 320caa56d1
commit 572f3e06ff

View file

@ -32,6 +32,8 @@ paper = new (PaperScope.inject(Base.exports, {
// confuse the require.js optimizer.
if (typeof define === 'function' && define.amd)
define('paper', paper);
else if (typeof module === 'object')
module.exports = paper;
/*#*/ } else if (__options.environment == 'node') {