Home > News content

Google Closure Compiler turn JavaScript from Java

via:博客园     time:2016/9/5 17:00:17     readed:1519


English text:Google Closure compiler moves from Java to JavaScript

Author: Paul Krill Translation: Lai Xintao Editor: Chung Pei Yi

In order to optimize and convert raw JavaScript code and Google Closure compiler, Java will no longer need to perform. Instead, Java source code can now be compiled into JavaScript code running in Node.js or browser. Closure on Java in 2009, introduced by Google.

This weekExperimental releaseSupport manyECMAScript 2015Features, such as arrows and other functions, but also provides some ES2015 alternatives. It can check syntax and type checking, and provide a warning. Google reminded some of the features now is not stable, there is no Java version efficiency high.

The upgrade does not use JavaScript to rewrite the Closure. To use the new version, developers need to add dependencies through NPM, or use by Gulp build system.

Google's Software Development Engineer Sam Thorogood representation, & ldquo; If you want to migrate up from the Google Closure requires Java compiler, then, the need forgulp.src ()Or alternatives to load JavaScript, then compiled. In view of the compiler is run on pure JavaScript, so the compiler can not read or write files directly from the file system. & Rdquo; Github's release note pointed out, do not use Gulp or Webpack widget developers need to specify the portion of the code through the label.

Closure is now using Apache 2.0 protocol.

China IT News APP

Download China IT News APP

Please rate this news

The average score will be displayed after you score.

Post comment

Do not see clearly? Click for a new code.

User comments

Related news