Skip to content


Subversion checkout URL

You can clone with
Download ZIP


version that works with Google Closure Compiler #20

wants to merge 1 commit into from

2 participants


Closure Compiler in advanced mode needs a special syntax for global objects and goog.provide/require annotations. As far as I could test it, the submitted version works nicely.


That's very interesting! Thank you for taking the time to figure this out!

Looking at the code, I'm curious if there's a way to allow the code to nicely work with both the goog.provide syntax and the CommonJS compatible version. I'd love to bundle it all into a single file if possible so that neither version falls behind the other. I'll look into that briefly, but if I can't find a good common ground I'll at least pull your variant in.

Thanks again!


The usual way is to provide an extern file that specifies all the variable names that shouldn't be renamed. Example for jQuery:
However, it has a negative impact on compilation, the best option is to compile all files using the compiler (and gl-matrix has a perfect JSDoc for that, well done!). Could you test if my version works with CommonJS (after removing goog.provide)? If it does, I could add a few lines to detect if complier is used and drop goog.provide if not.

@toji toji closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2012
  1. @fridek
Something went wrong with that request. Please try again.