mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Removed the hackiness from getting around browserify.
This commit is contained in:
parent
dad95b309b
commit
d7a1282b0b
@ -562,10 +562,8 @@ var Kinetic = {};
|
|||||||
// Node. Does not work with strict CommonJS, but
|
// Node. Does not work with strict CommonJS, but
|
||||||
// only CommonJS-like enviroments that support module.exports,
|
// only CommonJS-like enviroments that support module.exports,
|
||||||
// like Node.
|
// like Node.
|
||||||
|
var Canvas = require('canvas');
|
||||||
// We break the names to trick the browserify compiler
|
var jsdom = require('jsdom').jsdom;
|
||||||
var Canvas = require('can'+'vas');
|
|
||||||
var jsdom = require('js'+'dom').jsdom;
|
|
||||||
var doc = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
|
var doc = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
|
||||||
|
|
||||||
Kinetic.document = doc;
|
Kinetic.document = doc;
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
"graphic",
|
"graphic",
|
||||||
"html5"
|
"html5"
|
||||||
],
|
],
|
||||||
|
"browser": {
|
||||||
|
"canvas": false,
|
||||||
|
"jsdom": false
|
||||||
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/ericdrowell/KineticJS/issues"
|
"url": "https://github.com/ericdrowell/KineticJS/issues"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user