-
-
Notifications
You must be signed in to change notification settings - Fork 461
Closed
Labels
Description
I'm a fan of Node.js and I want to package twojs in my code with Browserify.
I tried to place the file build/two.js with a new generated package.json, then require it in a script.
Well, seems it doesn't work.. the _ object behaves strangely..
I found such code like this:
https://github.com/jonobr1/two.js/blob/master/src/two.js#L1304-L1310
//exports to multiple environments
if (typeof define === 'function' && define.amd)
//AMD
define(function(){ return Two; });
else if (typeof module != "undefined" && module.exports)
//Node
module.exports = Two;It says in the comments that CommonJS style is supported, I guess.
But it's broken.