dojo / util

Dojo 1 - build utilities. Please submit bugs to https://bugs.dojotoolkit.org/
https://dojotoolkit.org/
Other
60 stars 105 forks source link

buildControl: set default values for Closure languageIn/languageOut #83

Closed msssk closed 3 years ago

msssk commented 4 years ago

The Google Closure Compiler has a default language output setting that may change by release. v20170806 changed the default output language to ECMASCRIPT5.

This PR adds a default values for languageIn (ECMASCRIPT_2017) and languageOut (ECMASCRIPT3) if the build tool is configured to use the Google Closure Compiler. These can be overridden in optimizeOptions in the build profile.

ECMASCRIPT_2017 is used for languageIn to allow existing code to continue working. With the addition of block scope in ES6 the Google Closure Compiler treats block-scoped functions as errors in pre-ES6 code.

Fixes #81