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

Share minified code only in production #59

Closed
esamattis opened this issue Jan 26, 2012 · 6 comments
Closed

Share minified code only in production #59

esamattis opened this issue Jan 26, 2012 · 6 comments

Comments

@esamattis
Copy link

ShareJS should serve minified code only when NODE_ENV=production is set.

Or if there is a way to disable it, it should be documented better :)

I had today hard time debugging it.

@josephg
Copy link
Owner

josephg commented Jan 26, 2012

ShareJS will serve the uncompressed version of the JS as well. While debugging, I just change my script reference to

<script src="share/share.uncompressed.js"></script>

Is NODE_ENV pretty standard now? You're right - that might be a better idea.

@esamattis
Copy link
Author

Well at least Express uses it and it's pretty de facto :)

But anyways consider this as documentation issue. I think by default we should point people to use the uncompressed one. Minified one comes to table only when the app is really in production. Before that we should make everything clear as possible for the developers.

Maybe share/share.jsshould serve the uncompressed one and share/share.min.js the minified one?

@esamattis esamattis reopened this Jan 26, 2012
@josephg
Copy link
Owner

josephg commented Jan 26, 2012

Yeah fair enough. For now lets make the documentation by default point to share.uncompressed.js, and mention the minified version.

Mind if I assign this to you, @epeli ?

@esamattis
Copy link
Author

Well, sure, go ahead and assign :)

@ghost ghost assigned esamattis Jan 26, 2012
CrypticSwarm added a commit to CrypticSwarm/ShareJS that referenced this issue Apr 19, 2012
@CrypticSwarm
Copy link
Contributor

Examples now use unminified version. Can this issue be closed?

@esamattis
Copy link
Author

Oh, I totally forgot this. Yes, thank you!

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

No branches or pull requests

3 participants