mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Move define() statement to export.js and remove define hack in PaperScript.
This commit is contained in:
parent
4b53d558f1
commit
eef736f3d8
3 changed files with 4 additions and 6 deletions
|
@ -19,8 +19,6 @@
|
|||
// better minification and the future use of strict mode once it makes sense
|
||||
// in terms of performance.
|
||||
paper.PaperScope.prototype.PaperScript = new function() {
|
||||
// Locally override define, so acorn.js does not export itself
|
||||
var define = null;
|
||||
/*#*/ if (options.parser == 'acorn') {
|
||||
/*#*/ include('../../lib/acorn-min.js');
|
||||
/*#*/ } else if (options.parser == 'esprima') {
|
||||
|
|
|
@ -20,3 +20,7 @@ paper = new (PaperScope.inject(Base.merge(Base.exports, {
|
|||
DomElement: DomElement,
|
||||
DomEvent: DomEvent
|
||||
})))();
|
||||
|
||||
// Support AMD (e.g. require.js)
|
||||
if (typeof define === 'function' && define.amd)
|
||||
define(paper);
|
||||
|
|
|
@ -131,7 +131,3 @@ return paper;
|
|||
// include PaperScript separately outside the main paper scope, due to its use
|
||||
// of with(). This also simplifies making its inclusion optional.
|
||||
/*#*/ include('core/PaperScript.js');
|
||||
|
||||
// Support AMD (e.g. require.js)
|
||||
if (typeof define === 'function' && define.amd)
|
||||
define(paper);
|
||||
|
|
Loading…
Reference in a new issue