This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article has an unclear citation style. The reason given is: Violates Wikipedia:External links: "Wikipedia articles may include links to web pages outside Wikipedia (external links), but they should not normally be used in the body of an article." The references used may be made clearer with a different or consistent style of citation and footnoting. (July 2016) (Learn how and when to remove this template message) This article contains content that is written like an advertisement. Please help improve it by removing promotional content and inappropriate external links, and by adding encyclopedic content written from a neutral point of view. (October 2019) (Learn how and when to remove this template message) (Learn how and when to remove this template message)
Google Closure Tools
Closure logo.svg
Original author(s)Google
Initial releaseNovember 5, 2009[1]
Stable release
v20190618 / June 22, 2019; 3 years ago (2019-06-22)[2]
Repository
Written inJava
Available inJavaScript
TypeAjax framework
LicenseApache License 2.0
Websitedevelopers.google.com/closure/

Google Closure Tools[3] is a set of tools to help developers build rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps.[4]

Closure Compiler

The Closure Compiler is a tool for making JavaScript downloads run faster, at the expense of human readability. It does not compile from JavaScript to machine code, but rather compiles from JavaScript to more efficient JavaScript.

It parses JavaScript, analyzes it, removes dead code and rewrites and minifies what is left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. It supports transpiling modern ECMAScript code to ECMAScript 5, so that programmers can write JavaScript that uses those features, and run it in browsers or other environments that do not yet support them. (the Traceur Compiler is another Google project that supports transpiling ES6 to ES3.)

CLI based tools

Tool set provide a command line tools used to optimize and compile .js files:

Others

The Closure compiler also supports type checking via type annotations that must be written in JSDoc comments.[7]

Ecosystem

Programming languages that transpile to JavaScript benefit from Closure Tools. For example, Closure Compiler helps to make ClojureScript practical by making the compiled JavaScript code more efficient.[8]

Closure Library

The Closure Library is a JavaScript library, written specifically to take advantage of the Closure Compiler, based on a modular architecture. It provides cross-browser functions for DOM manipulations and events, Ajax and JSON, as well as more high-level objects such as User Interface widgets and Controls.

Closure Templates

Closure Templates are a templating system for dynamically generating HTML in both Java[9] and JavaScript.[10]

Because the language was apparently referred to as "Soy" internal to Google, and "Soy" remains in some of the documentation and classes,[11] sometimes Closure Templates are referred to as "Soy Templates".

Closure Stylesheets

This is a compiler which provides an extended version of CSS, which is compiled down to ordinary CSS. Internally in Google, this extended version of CSS is referred to as GSS.

See also

References

  1. ^ "Introducing Closure Tools - The official Google Code blog". 5 November 2009.
  2. ^ "GitHub - google/closure-compiler: A JavaScript checker and optimizer". 3 April 2019 – via GitHub.
  3. ^ Bolin, Michael, "Closure: The Definitive Guide", O'Reilly Media Inc., Sebastopol, CA, 2010
  4. ^ "FAQ - Closure Tools". Google Developers.
  5. ^ "Online closure compiler".
  6. ^ "Closure compiler API".
  7. ^ "Annotating JavaScript for the Closure Compiler".
  8. ^ "Motivations for using Google's Closure Tools".
  9. ^ "Hello World Using Java". Google Developers.
  10. ^ https://code.google.com/closure/templates/docs/helloworld_js.html JavaScript
  11. ^ "Google Code Archive - Long-term storage for Google Code Project Hosting". code.google.com.