JavaScript Compiler Power by Google Closure Tools
2012-11-21 00:21
429 查看
What is the Closure Compiler?
The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript,
analyzes it, removes dead code and rewrites and minimizes what’s left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.
The Closure Compiler has been integrated with Page Speed, which makes it easier to evaluate the performance gains you can get by using the compiler.
How can I use the Closure Compiler?
You can use the Closure Compiler as:
An open source Java application that you can run from the command line.
A simple web application.
A RESTful API.
To get started with the compiler, see “How do I start” to the right.
What are the benefits of using Closure Compiler?
Efficiency. The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs.
Code checking. The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and easier to maintain.
How do I start?
Work through the UI Hello World.
Work through the API Hello World.
Download the application.
Work through the Application Hello World.
Read about Advanced compilation.
Use the Closure Inspector to debug.
Explore the project’s source code.
通过Closure Tools — Google Developers.
Posted by ian at 17:52
The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript,
analyzes it, removes dead code and rewrites and minimizes what’s left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.
The Closure Compiler has been integrated with Page Speed, which makes it easier to evaluate the performance gains you can get by using the compiler.
How can I use the Closure Compiler?
You can use the Closure Compiler as:
An open source Java application that you can run from the command line.
A simple web application.
A RESTful API.
To get started with the compiler, see “How do I start” to the right.
What are the benefits of using Closure Compiler?
Efficiency. The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs.
Code checking. The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and easier to maintain.
How do I start?
Work through the UI Hello World.
Work through the API Hello World.
Download the application.
Work through the Application Hello World.
Read about Advanced compilation.
Use the Closure Inspector to debug.
Explore the project’s source code.
通过Closure Tools — Google Developers.
Posted by ian at 17:52
相关文章推荐
- 使用Google的Closure Compiler,在本机上压缩javascript
- Google Closure Compiler开源的javascript压缩加密工具
- 使用Google closure Compiler 压缩javascript文件
- 在线压缩javascript --- Google Closure Compiler
- 使用Google Closure Compiler高级压缩Javascript代码注意的几个地方
- 使用Google JavaScript Closure Compiler压缩 javascript 文件
- 使用Google Closure Compiler高级压缩Javascript代码
- Google Closure Compiler开源的javascript压缩加密工具
- [JavaScript] Google Closure: 糟糕的JavaScript
- 使用Google Closure Compiler全力压缩代码(转)
- 主流JavaScript框架(Dojo、Google Closure、jQuery、Prototype、Mootools和YUI)的分析和对比
- Google Power Tools Bible
- (转)Google Closure: 糟糕的JavaScript
- 在项目中使用Google Closure Compiler
- 在项目中使用Google Closure Compiler
- Google Closure Compiler 高级模式及更多思考(转)
- 主流JavaScript框架(Dojo、Google Closure、jQuery、Prototype、Mootools和YUI)的分析和对比
- Ubuntu10.10下安装Google Closure Linter检查javascript语法
- 使用eval导致Google Closure Compiler压缩代码后运行出错的解决办法
- Closure Compiler is a JavaScript optimizing compiler.