惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
Forbes - Security
Forbes - Security
The Last Watchdog
The Last Watchdog
F
Full Disclosure
GbyAI
GbyAI
G
Google Developers Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
T
The Blog of Author Tim Ferriss
C
Check Point Blog
S
Security @ Cisco Blogs
H
Help Net Security
N
News | PayPal Newsroom
D
DataBreaches.Net
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
U
Unit 42
WordPress大学
WordPress大学
月光博客
月光博客
Security Latest
Security Latest
V
V2EX
Schneier on Security
Schneier on Security
美团技术团队
Y
Y Combinator Blog
G
GRAHAM CLULEY
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Securelist
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
P
Proofpoint News Feed
O
OpenAI News
Cisco Talos Blog
Cisco Talos Blog
Martin Fowler
Martin Fowler
N
News and Events Feed by Topic
小众软件
小众软件
S
Schneier on Security
Webroot Blog
Webroot Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
T
Threatpost
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Scott Helme
Scott Helme
N
Netflix TechBlog - Medium
有赞技术团队
有赞技术团队
W
WeLiveSecurity
S
SegmentFault 最新的问题
Cloudbric
Cloudbric
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
M
MIT News - Artificial intelligence

博客园 - 豆豆の爸爸

IDEA 2024的零卡死配置 10分钟揭秘大模型的原理 苹果容器Apple container是做什么用的? pnpm 10.14 支持JavaScript运行时的安装了 白话Docker:用Web应用实例深入容器 用 rake 合并多个 JS 文件,并且用 Google Closure Compiler 压缩代码 HTML 5 就是 Web Application JS程序员的一天 Google Map 类实例在类式继承中的实现 写入 cookie 的过期时间时在GMT或UTC时间格式上的兼容问题 “当 HTML 5 来敲门”专题沙龙(上海)活动 PHP 的 Smarty 模板页中分离JS并避开literal标签的解决方法 Google Maps(Google 地图) V3 在 IE7 浏览器中拖放其容器时图块被覆盖的 bug 2010年我的个人总结 [译]用 Closure Compiler 编写更好的 OO 的 JavaScript 使用 IronScheme 进入 Scheme 编程语言的世界 - 豆豆の爸爸 《JS高级程序设计(第2版)》书评 [译]在 Firebug 中的表格化日志 在 Notepad++ 运行 Closure Linter 来校验JS代码
在 Notepad++ 运行 Closure Compiler 工具来解析并压缩JS
豆豆の爸爸 · 2010-11-27 · via 博客园 - 豆豆の爸爸

Google 的 Closure Compiler 工具是款JS的编译器,它可以使JS下载、运行更快。与同类压缩工具 YUI Compressor 相比,它不仅有最基本的压缩的功能,而且功能更强大!

在 Notepad++ 中打开 NppExec,执行如下命令:

cd D:\ClosureCompiler
java -jar  D:\ClosureCompiler\compiler.jar --js $(FULL_CURRENT_PATH) --js_output_file event-compiled.js

可以将这个命令保存为 Closure Compiler。点击“OK”试试,如果在控制台窗口输出如下结果:

CD: D:\ClosureCompiler
Current directory: D:\ClosureCompiler
java -jar  D:\ClosureCompiler\compiler.jar --js D:\work\WOYO\js\event.js --js_output_file event-compiled.js
Process started >>>
<<< Process finished.
================ READY ================

则说明当前的JS源文件已经在ClosureCompiler文件夹中压缩并解析后新的JS源文件。

(完)