mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Switch to jsdom v8.3.0, now that it includes our node-canvas PR.
See https://github.com/tmpvar/jsdom/pull/1366
This commit is contained in:
parent
53c9a9530e
commit
f4e4e7ab9c
3 changed files with 9 additions and 2 deletions
|
@ -6,7 +6,7 @@ var path = require('path');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
|
||||||
paper.setup(new paper.Size(300, 600));
|
paper.setup(new paper.Size(300, 600));
|
||||||
paper.project.importSVG(/*'in.svg'*/'file://' + path.resolve('./in.svg'), {
|
paper.project.importSVG('file://' + path.resolve('./in.svg'), {
|
||||||
onLoad: function(item) {
|
onLoad: function(item) {
|
||||||
paper.view.exportFrames({
|
paper.view.exportFrames({
|
||||||
amount: 1,
|
amount: 1,
|
||||||
|
@ -18,5 +18,8 @@ paper.project.importSVG(/*'in.svg'*/'file://' + path.resolve('./in.svg'), {
|
||||||
console.log(event.percentage + '% complete, frame took: ' + event.delta);
|
console.log(event.percentage + '% complete, frame took: ' + event.delta);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
onError: function(message) {
|
||||||
|
console.error(message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"node": ">=4.0.0 <6.0.0"
|
"node": ">=4.0.0 <6.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsdom": "git://github.com/lehni/jsdom.git#bd86dd16666241edd5f25bc4f4e144f24da3c889",
|
"jsdom": "^8.3.0",
|
||||||
"source-map-support": "^0.4.0"
|
"source-map-support": "^0.4.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|
|
@ -18,6 +18,10 @@ var jsdom = require('jsdom');
|
||||||
// Create our document and window objects through jsdom.
|
// Create our document and window objects through jsdom.
|
||||||
/* global document:true, window:true */
|
/* global document:true, window:true */
|
||||||
var document = jsdom.jsdom('<html><body></body></html>', {
|
var document = jsdom.jsdom('<html><body></body></html>', {
|
||||||
|
// Give the resulting document the same origins as the XMLHttpRequest
|
||||||
|
// objects for local files, so files can be loaded locally without CORS.
|
||||||
|
// TODO: Find a proper solution instead of this hack.
|
||||||
|
url: 'file://',
|
||||||
features: {
|
features: {
|
||||||
FetchExternalResources: ['img', 'script']
|
FetchExternalResources: ['img', 'script']
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue