edx/edx-platform — pull request #5518 by polesye (2014-10-08 07:54:51+00:00)
Title: [WIP] Add RequireJS Optimizer.

**Ticket:** [TNL-481](https://openedx.atlassian.net/browse/TNL-481)

r.js provides us possibility to use 3 minification tools: Uglify (default), Uglify2 and Closure compiler.
**Uglify2** has good compression ratio and good speed, but it can be used once nodejs has been upgraded to 0.8 and above.
**Closure compiler** is a big dependency and requires the JVM and Java.
Some of the libraries use the global eval function. **UglifyJS** will normally prevent any name mangling from taking place in this case, resulting in bigger output. Since **Closure** doesn't do that (it just mangles names regardless of whether eval or with are in use).
In any case, no matter what tool to use here, because the main effect gives us a reduction in the number of requests. So, we'll use default moinification tool (Uglify).