mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
add commonJS export in browser environment export
This commit is contained in:
parent
320caa56d1
commit
572f3e06ff
1 changed files with 2 additions and 0 deletions
|
@ -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') {
|
||||
|
||||
|
|
Loading…
Reference in a new issue