-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
When developing Closure minification support to Emscripten compiler, there is a need to annotate some symbols with e.g. @suppress {undefinedVars} or @suppress {duplicate}.
If I use an --externs file to specify an annotation, e.g. --externs externs.js, with
/**
* @suppress {duplicate}
*/
var foo;then not only does Closure take in the annotation, but it also then will no longer minify foo, because it is being specified in an externs file.
If I use a --js file before the main JS file to specify an annotation, e.g. --js annotation.js --js main.js, with
/**
* @suppress {duplicate}
*/
var foo;then Closure will want to add (in some scenarios, not quite sure when this occurs) a top level global dummy variable var a; in the beginning of the Closured output file, that takes up redundant space and bloats the final output.
What I'd like to do is specify a --annotations annotations.js file that would not prevent minification like externs does, but neither will cause dummy symbols being defined to the build output, like --js does. Is this possible somehow with current Closure?