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

推荐订阅源

Project Zero
Project Zero
Y
Y Combinator Blog
雷峰网
雷峰网
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
博客园 - 聂微东
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
罗磊的独立博客
M
MIT News - Artificial intelligence
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
大猫的无限游戏
大猫的无限游戏
V
V2EX
I
InfoQ
The Cloudflare Blog
Cloudbric
Cloudbric
Stack Overflow Blog
Stack Overflow Blog
V
Vulnerabilities – Threatpost
博客园_首页
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
T
The Exploit Database - CXSecurity.com
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
美团技术团队
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tor Project blog
P
Privacy International News Feed
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
博客园 - 三生石上(FineUI控件)
Cyberwarzone
Cyberwarzone
Vercel News
Vercel News
Cisco Talos Blog
Cisco Talos Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
G
Google Developers Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
Arctic Wolf
MongoDB | Blog
MongoDB | Blog

博客园 - 豆豆の爸爸

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

(完)