Make Palette code optional and only include id in paper-full.js

This commit is contained in:
Jürg Lehni 2013-10-29 21:56:00 +01:00
parent 4042d4fc2c
commit f211c20e77
3 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -22,6 +22,7 @@ var options = {
svg: true,
fatline: true,
paperscript: true,
palette: true,
nativeContains: false,
debug: false
};

View file

@ -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');