mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Make inclusion of PaperScript optional and build a core version of the library without it.
This commit is contained in:
parent
eef736f3d8
commit
e6bed426d7
4 changed files with 5 additions and 0 deletions
|
@ -31,4 +31,5 @@ then
|
|||
fi
|
||||
|
||||
./preprocess.sh $MODE ../src/paper.js "-d '{ \"browser\": true }' -i '../src/constants.js'" ../dist/paper.js
|
||||
./preprocess.sh $MODE ../src/paper.js "-d '{ \"browser\": true, \"paperscript\": false }' -i '../src/constants.js'" ../dist/paper-core.js
|
||||
#./preprocess.sh $MODE ../src/paper.js "-d '{ \"node\": true }' -i '../src/constants.js'" ../dist/paper-node.js
|
||||
|
|
|
@ -13,3 +13,4 @@
|
|||
# We need to keep dead_code around for now, since the very odd JavaScriptCore
|
||||
# scope bug fix (nop().nop()) requires it.
|
||||
uglifyjs ../dist/paper.js -o ../dist/paper-min.js -c unsafe=true,unused=false,dead_code=false,hoist_funs=false -m -r "_$_,$_" -b ascii_only=true,beautify=false --comments /^!/
|
||||
uglifyjs ../dist/paper-core.js -o ../dist/paper-core-min.js -c unsafe=true,unused=false,dead_code=false,hoist_funs=false -m -b ascii_only=true,beautify=false --comments /^!/
|
||||
|
|
|
@ -20,5 +20,6 @@ var options = {
|
|||
stats: true,
|
||||
svg: true,
|
||||
fatline: true,
|
||||
paperscript: true,
|
||||
debug: false
|
||||
};
|
||||
|
|
|
@ -130,4 +130,6 @@ return paper;
|
|||
|
||||
// include PaperScript separately outside the main paper scope, due to its use
|
||||
// of with(). This also simplifies making its inclusion optional.
|
||||
/*#*/ if (options.paperscript) {
|
||||
/*#*/ include('core/PaperScript.js');
|
||||
/*#*/ } // options.paperscript
|
||||
|
|
Loading…
Reference in a new issue