node-easel
node-easel copied to clipboard
Global variable
The way the library works now is wrong. It should not create a global createjs variable, it should return it's contents as all of Node's modules do (using module.exports), to avoid polluting the global namespace (even if there is only this one variable working as a namespace, this is not the Node way to do things). I understand, that you want to make the usage as close to the browser as possible, but this one thing should be changed.
#EDIT Apparently the variable was exported in the 1a35f0f commit, but it's not there anymore.
It wasn't really about keeping usage the same as the browser, it was about making future updates painless. Porting EaselJS to a proper node module was just not feasible. Since there is a lot of internal Easel code that depends on having that global createjs namespace (and a handful of browser classes as well). But this is something I'll be looking into for the future, once Easel is at a more stable state.
the global namespace is used by everything, including Node.. Relax and drink a glass of wine.
@hayesmaker I hope you didn't authored any Node.js modules if that's how you think. None of the good modules I know create or use any kind of global namespace, and even if there was some that do it doesn't change the fact that anything global is wrong.