Google's Closure compiler is now available in pure JavaScript, and no longer needs Java to run. The new experimental release runs under NodeJS with support for some popular build tools.
The Closure Compiler compiles JavaScript into compact, high-performance code. It removes dead code and rewrites and minimizes what's left so that it downloads and runs quickly. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. Nearly every web front end at Google uses it.
The new version supports new features in ES2015, such as let, const, arrow functions. The compiler also checks syntax, correct use of types, and provides warnings of potential problems.
Writing about the new release on the Google Developer blog, Google's Sam Thorogood said that this isn't a rewrite of Closure in JavaScript, adding:
"Instead, we compile the Java source to JS to run under Node, or even inside a plain old browser."
The JavaScript version is currently experimental, and may not perform in the same way as the native Java version. The Closure team will be working to improve and support it over time.
In order to use the new version, you'll need to add it as a dependency in a project via NPM. Alternatively, you can use it with the Gulp streaming build system. This would involve using gulp.src() or equivalents to load your JavaScript before it can be compiled, according to Thorogood, who said that as the compiler runs in pure JavaScript, it can't load or save files from your file system directly.
More Information
Related Articles
Google's JavaScript Team Proposes "Strong Mode"
To be informed about new articles on I Programmer, sign up for our weekly newsletter,subscribe to the RSS feed and follow us on, Twitter, Facebook, Google+ or Linkedin.
IBM Launches Granite Version 4.0 and Granite-Docling
23/10/2025
IBM has launched Granite 4.0, the next generation of open-source, small but efficient, IBM language models, together with Granite-Docling, the next gen document format converter.
Codacy Provides Free AI- Risk Assessment
05/11/2025
Codeacy has launched a free benchmarking survey to help engineering teams measure the risk profile of their AI coding workflows when using tools like GitHub Copilot, Cursor, or Claude and co [ ... ]
- .NET 10 Final Release Candidate Focuses On MAUI
- Microsoft Announces GitHub Copilot App For Java And .NET
- Google AI Studio Does Angular
- Memgraph Adds AI Graph Toolkit
- GitHub Announces Agent HQ Organizer
- DH2i Launches DxEnterprise For SQL Server 2025
- OpenCode - The Claude Code Alternative
- Insectile Garments For Dutch Design Week
- AI Improves Devs Skills, Enhances Their Roles
- PyTorch Team Introduces Cluster Programming
- Julia 1.12 Adds Trim Feature
- Edera Open Sources Sprout
- The Pico Gets Zephyr And Rust Support
Comments
or email your comment to: comments@i-programmer.info