GoogleChrome / accessibility-developer-tools

This is a library of accessibility-related testing and utility code.
Apache License 2.0
2.28k stars 363 forks source link

Make it possible to strip goog.export* usages #275

Open ewinslow opened 8 years ago

ewinslow commented 8 years ago

I'm attempting to include this project in a new framework I'm building to automatically run accessibility checks whenever the UI updates. However, I want it to be completely stripped out for a production build. Unfortunately, the calls to goog.exportSymbol and such are preventing me from doing that.

Any chance we can get these moved to @export annotations so that the code will only be exported with the compiler flags set appropriately?

Another idea I had would be to wrap the exports in a compile-time flag so that I can turn this flag off and strip them out if they're not needed.

ewinslow commented 8 years ago

Impact on size is about 13k after gzip, which is pretty substantial. For my app currently, numbers are 18647 bytes with adt included, 5053 after removing adt.

Another idea: have a separate file with all the exportSymbol calls that is used to generate the binary, but excluded for apps including it as a direct dependency.