From f211c20e7784bb3cb02903440a0540848a855983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 29 Oct 2013 21:56:00 +0100 Subject: [PATCH] Make Palette code optional and only include id in paper-full.js --- build/build.sh | 2 +- src/options.js | 1 + src/paper.js | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/build.sh b/build/build.sh index ba4f6a8a..52cfbcb8 100755 --- a/build/build.sh +++ b/build/build.sh @@ -31,7 +31,7 @@ then fi ./preprocess.sh $MODE ../src/paper.js "-i '../src/constants.js'" ../dist/paper-full.js -./preprocess.sh $MODE ../src/paper.js "-o '{ \"paperscript\": false }' -i '../src/constants.js'" ../dist/paper-core.js +./preprocess.sh $MODE ../src/paper.js "-o '{ \"paperscript\": false, \"palette\": false }' -i '../src/constants.js'" ../dist/paper-core.js ./preprocess.sh $MODE ../src/paper.js "-o '{ \"environment\": \"node\" }' -i '../src/constants.js'" ../dist/paper-node.js # Remove the existing file and copy paper-full.js to paper.js now diff --git a/src/options.js b/src/options.js index c462b2ee..db23c84d 100644 --- a/src/options.js +++ b/src/options.js @@ -22,6 +22,7 @@ var options = { svg: true, fatline: true, paperscript: true, + palette: true, nativeContains: false, debug: false }; diff --git a/src/paper.js b/src/paper.js index 19e7b37a..9899f659 100644 --- a/src/paper.js +++ b/src/paper.js @@ -111,8 +111,10 @@ var paper = new function(undefined) { /*#*/ include('ui/Key.js'); /*#*/ include('ui/MouseEvent.js'); +/*#*/ if (options.palette) { /*#*/ include('ui/Palette.js'); /*#*/ include('ui/Component.js'); +/*#*/ } // options.palette /*#*/ include('tool/ToolEvent.js'); /*#*/ include('tool/Tool.js');