-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation missing default language_in and language_out modes #3679
Comments
Also it seems that there is an option Also, related question I have is: If one specifies What I would like to achieve is to enable the source code that I am minifying to (possibly) contain ES 2018 constructs, but have Closure not emit any ES 2018 constructs by itself during minification process, but only emit ES5 constructs. In other words, is there a set of
The motivation for this comes from providing a set of default flags for Emscripten compiler's Closure operation. |
I'll try to answer your questions here, then maybe use this to update the docs. The default value for What At the moment
We promise not to output any language features higher than For historical and ease-of-maintenance reasons we rarely ever output newer language features than those that originally appeared in the input, but there are some cases where we do. We'll likely do it more in the future, since newer language features often also allow us to output less code. So, no, there's no combination of options that would guarantee not to add newer features without also transpiling away those features if they appear in the input. |
Logic for interpreting the command line options is here. closure-compiler/src/com/google/javascript/jscomp/CommandLineRunner.java Lines 1780 to 1808 in aaae1b7
Oh, also, closure-compiler/src/com/google/javascript/jscomp/CompilerOptions.java Lines 1906 to 1909 in aaae1b7
and means the same thing as not specifying closure-compiler/src/com/google/javascript/jscomp/CompilerOptions.java Lines 1923 to 1932 in aaae1b7
Which looks really suspiciously like closure-compiler/src/com/google/javascript/jscomp/CompilerOptions.java Lines 1946 to 1953 in aaae1b7
It seems likely that some cleanup could be done here. :) |
In wiki page https://github.com/google/closure-compiler/wiki/Flags-and-Options, the docs
do not say what are the default options for these settings. That would be good to add?
Also, it would be good to describe the behavior of what happens if one passes only one of
--language_in
, or--language_out
, but not the other? (e.g. does--language_in ECMASCRIPT_2018
without an explicitly specified--language_out
directive imply--language_out ECMASCRIPT_2018
? Or does e.g.--language_out ECMASCRIPT_2018
without an explicitly specified--language_in
directive imply--language_in ECMASCRIPT_2018
?)The text was updated successfully, but these errors were encountered: