Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global variable #4

Open
maciek134 opened this issue Dec 29, 2013 · 3 comments
Open

Global variable #4

maciek134 opened this issue Dec 29, 2013 · 3 comments

Comments

@maciek134
Copy link

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.

@wdamien
Copy link
Owner

wdamien commented Jan 4, 2014

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.

@hayesmaker
Copy link

the global namespace is used by everything, including Node.. Relax and drink a glass of wine.

@maciek134
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants