Skip to content

TRANSPILE_ONLY mode #4231

@brad4d

Description

@brad4d

Summary

Add a TRANSPILE_ONLY mode that does the following:

  • Error checking as usual
  • Code changes necessary to generate running code, including:
    • handling goog.define()
    • handling goog.module()
    • transpiling down to the requested --language_out level, including the addition of polyfills
  • Otherwise leave the code unchanged. No optimizations. No renaming.

Background

WHITESPACE_ONLY mode is borderline useless, because what it means is very badly defined. In many cases it results in output code that will not run. Several examples can be seen in this issue search.

https://github.com/google/closure-compiler/issues?q=is%3Aissue%20state%3Aopen%20WHITESPACE_ONLY

On the other hand SIMPLE_OPTIMIZATIONS does much more than developers often want when they're "just" trying to get an executable version of their project as fast as possible for testing and debugging.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions