Re:Closure Compiler: a tool for making JavaScript download a...
by nunull on Monday August 31, 2015 @12:32PM
(#10147595)
May i ask why you are using this notation? I honestly can't think of any benefits. Isn't it more convenient and readable to use `p.removeAttr`?
[ Parent
| on HN ]
Re:Closure Compiler: a tool for making JavaScript download a...
by mythz on Monday August 31, 2015 @12:44PM
(#10147660)
My comment explains the entire purpose for using it - if I didn't, it would've got rewritten into `a.b` and none of the public API's would work!
Re:Closure Compiler: a tool for making JavaScript download a...
by eschutte2 on Monday August 31, 2015 @12:49PM
(#10147684)
I wish there were a better way to indicate which properties were renameable, because I need this too and I'm not willing to go as far as you did.
Re:Closure Compiler: a tool for making JavaScript download a...
by greggman on Monday August 31, 2015 @01:15PM
(#10147860)
You can tell it which properties to keep with `goog.exportSymbol()`
Re:Closure Compiler: a tool for making JavaScript download a...
by Shebanator on Monday August 31, 2015 @01:13PM
(#10147854)
there is a much better way to deal with this:
https://developers.google.com/closure/compiler/docs/api-tuto...
Re:Closure Compiler: a tool for making JavaScript download a...
by eschutte2 on Monday August 31, 2015 @11:41PM
(#10150598)
Thanks - I remember seeing that when looking through the docs, but I don't really like that either, unfortunately. I'm using Uglify right now, and I was thinking of adding a pre-minify step that walks the AST for a JSDoc-style annotation on either the properties themselves or a containing object, and pulls out the list of property names to preserve that way.