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

推荐订阅源

PCI Perspectives
PCI Perspectives
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 热门话题
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
Spread Privacy
Spread Privacy
The GitHub Blog
The GitHub Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
G
GRAHAM CLULEY
博客园 - Franky
P
Palo Alto Networks Blog
博客园 - 【当耐特】
T
The Blog of Author Tim Ferriss
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero
T
Threatpost
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
Google Online Security Blog
Google Online Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Threat Research - Cisco Blogs
Recent Announcements
Recent Announcements
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
T
Tenable Blog
W
WeLiveSecurity
腾讯CDC
小众软件
小众软件
博客园 - 聂微东
D
Docker
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
H
Hacker News: Front Page
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 豆豆の爸爸

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源文件。

(完)