mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge paper.js and build.js, to make sure the global paper object exists also when including seperate files during development and when running tests.
This commit is contained in:
parent
92bf51a7cc
commit
66f5fcc847
3 changed files with 50 additions and 51 deletions
|
@ -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
|
||||
|
|
43
src/build.js
43
src/build.js
|
@ -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"
|
||||
|
||||
};
|
54
src/paper.js
54
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];
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue