GLOW icon indicating copy to clipboard operation
GLOW copied to clipboard

Add npm module

Open mikolalysenko opened this issue 12 years ago • 3 comments

Creating an npm module for GLOW would be helpful for writing more complicated javascript applications using the require module system. Making these changes would require some small changes to the naming of the modules and checking for .exports

mikolalysenko avatar Dec 08 '12 18:12 mikolalysenko

Hey! It has crossed my mind, but I never sat down to do it. If you do it, please do it in a separate folder for now (called require.js or something clever) and we can see later if there's a way to have it in one. Possibly, could this be done at build stage?

empaempa avatar Dec 08 '12 18:12 empaempa

Ok, with your blessing I'll make an attempt. The one major problem that I am foreseeing though is that there are two main public interfaces for GLOW: GLOW and GL. I am thinking the best way to do would be to move GL into GLOW.GL, but this could break some existing code. I'll hack something together and send you a pull request.

mikolalysenko avatar Dec 09 '12 17:12 mikolalysenko

Right, try GLOW.GL and hope for the best. If possible, please keep the global GL. BTW: why can't there be two globals for one require module?

empaempa avatar Dec 09 '12 18:12 empaempa