Removed the hackiness from getting around browserify.

This commit is contained in:
Benjamin Horsleben 2014-05-06 19:42:47 +02:00
parent dad95b309b
commit d7a1282b0b
2 changed files with 6 additions and 4 deletions

View File

@ -562,10 +562,8 @@ var Kinetic = {};
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
// We break the names to trick the browserify compiler
var Canvas = require('can'+'vas');
var jsdom = require('js'+'dom').jsdom;
var Canvas = require('canvas');
var jsdom = require('jsdom').jsdom;
var doc = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
Kinetic.document = doc;

View File

@ -27,6 +27,10 @@
"graphic",
"html5"
],
"browser": {
"canvas": false,
"jsdom": false
},
"bugs": {
"url": "https://github.com/ericdrowell/KineticJS/issues"
},