diff --git a/build/build.sh b/build/build.sh index 61ea9123..7c35061f 100755 --- a/build/build.sh +++ b/build/build.sh @@ -20,5 +20,5 @@ then mkdir ../out/ fi -./preprocess.sh ../src/build.js ../out/paper-browser.js "-DBROWSER" $MODE -./preprocess.sh ../src/build.js ../out/paper.js "" $MODE +./preprocess.sh ../src/paper.js ../out/paper-browser.js "-DBROWSER" $MODE +./preprocess.sh ../src/paper.js ../out/paper.js "" $MODE diff --git a/src/build.js b/src/build.js deleted file mode 100644 index 240f064d..00000000 --- a/src/build.js +++ /dev/null @@ -1,43 +0,0 @@ -var paper = new function() { - -//#include "paper.js" - -//#include "basic/Point.js" -//#include "basic/Size.js" -//#include "basic/Rectangle.js" -//#include "basic/Matrix.js" - -//#include "document/DocumentView.js" -//#include "document/Document.js" -//#include "document/Symbol.js" - -//#include "item/Item.js" -//#include "item/Group.js" -//#include "item/Layer.js" -//#include "item/Raster.js" -//#include "item/PlacedSymbol.js" -//#include "item/PathStyle.js" - -//#include "path/Segment.js" -//#include "path/Curve.js" -//#include "path/PathItem.js" -//#include "path/Path.js" -//#include "path/CompoundPath.js" -//#include "path/Path.Constructors.js" - -//#include "color/Color.js" -//#include "color/RGBColor.js" -//#include "color/GrayColor.js" -//#include "color/GradientColor.js" -//#include "color/Gradient.js" -//#include "color/GradientStop.js" - -//#include "tool/ToolEvent.js" -//#include "tool/ToolHandler.js" -//#include "tool/Tool.js" - -//#include "util/CanvasProvider.js" -//#include "util/MathUtils.js" -//#include "util/PaperScript.js" - -}; diff --git a/src/paper.js b/src/paper.js index e7a15f55..71db94e0 100644 --- a/src/paper.js +++ b/src/paper.js @@ -1,8 +1,50 @@ -this.document = null; -this.documents = []; +var paper = new function() { + + this.document = null; + this.documents = []; + + this.install = function(scope) { + for (var i in this) { + scope[i] = this[i]; + } + }; + +//#include "basic/Point.js" +//#include "basic/Size.js" +//#include "basic/Rectangle.js" +//#include "basic/Matrix.js" + +//#include "document/DocumentView.js" +//#include "document/Document.js" +//#include "document/Symbol.js" + +//#include "item/Item.js" +//#include "item/Group.js" +//#include "item/Layer.js" +//#include "item/Raster.js" +//#include "item/PlacedSymbol.js" +//#include "item/PathStyle.js" + +//#include "path/Segment.js" +//#include "path/Curve.js" +//#include "path/PathItem.js" +//#include "path/Path.js" +//#include "path/CompoundPath.js" +//#include "path/Path.Constructors.js" + +//#include "color/Color.js" +//#include "color/RGBColor.js" +//#include "color/GrayColor.js" +//#include "color/GradientColor.js" +//#include "color/Gradient.js" +//#include "color/GradientStop.js" + +//#include "tool/ToolEvent.js" +//#include "tool/ToolHandler.js" +//#include "tool/Tool.js" + +//#include "util/CanvasProvider.js" +//#include "util/MathUtils.js" +//#include "util/PaperScript.js" -this.install = function(scope) { - for (var i in this) { - scope[i] = this[i]; - } };