Automic VaultAutomic Vault

brew

使用 Homebrew, MacPorts, Nix 安装 yuicompressor

查看 yuicompressor 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install yuicompressor

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install yuicompressor

MacPorts ports tree · www/yuicompressor/Portfile · 来源: api.github.com

Linux

Nix已验证 · 92%
nix profile install nixpkgs#yuicompressor

nixpkgs package indexes · pkgs/by-name/yu/yuicompressor/package.nix · 来源: api.github.com

概览

软件包摘要

Yahoo! JavaScript and CSS compressor

命令和别名

  • yuicompressor

历史

项目历史与用法

YUI Compressor is Yahoo's Java-based JavaScript and CSS minifier from the YUI era. It removes comments and whitespace, shortens local JavaScript symbols when safe, compresses CSS, and became a standard build-step tool before newer JavaScript-native minifiers took over much of the ecosystem.

For package managers, its identity is very CLI-shaped: install a small wrapper around a Java jar, point it at .js or .css files, and produce smaller production assets. That made it easy to package across Homebrew, MacPorts, Maven, npm wrappers, and older Ant-era web build systems.

项目历史

The project grew out of Yahoo's frontend performance work around the YUI Library. The official project page frames minification as one of the secondary performance techniques used after larger page-design savings, and compares YUI Compressor with tools such as JSMin, the Dojo compressor, and Dean Edwards' Packer.

Technically, YUI Compressor used Mozilla Rhino to tokenize JavaScript instead of relying only on text substitutions. That let it remove whitespace and rename local symbols while taking a defensive approach around difficult JavaScript constructs such as eval and with. CSS compression was also included, using a regular-expression-based minifier lineage credited on the official page.

The public GitHub repository was created in December 2008, while the changelog preserves a longer 2.x release line. The final tagged GitHub release, v2.4.8 'Greendale', was published in July 2013 and focused on compatibility fixes, CSS compression improvements, warning output, parameter parsing, batch modes, and tests.

采用历史

YUI Compressor became popular because it matched the way web teams shipped assets in the late 2000s and early 2010s: Java was already common in build infrastructure, Ant integration was natural, and the command-line interface fit makefiles, CI jobs, and static asset deployment scripts.

Its official documentation emphasizes byte savings compared with JSMin and safe handling of JavaScript and CSS. Those claims mattered in the pre-bundler period, when teams often concatenated and minified library files directly rather than running a full module pipeline.

Later adoption shifted toward wrapper packages and legacy maintenance. The README documents an npm package that still invokes Java under the hood, showing how the compressor was carried forward into Node-oriented workflows even though its implementation remained a Java command-line tool.

使用方式

Typical use is batch minification: run the yuicompressor command or jar against JavaScript or CSS input, set the type explicitly when needed, and write to stdout or an output file. The README documents options for character set, line breaking, JavaScript symbol munging, semicolon preservation, and disabling micro-optimizations.

The tool is most relevant today when reproducing older web builds, maintaining projects that were pinned to YUI-era minification behavior, or comparing historical minifier output. It is also a useful example of a minifier that exposes safety knobs for constructs and comments that mattered to production JavaScript/CSS deployment.

为什么软件包爱好者会关心

YUI Compressor is package-nerd archaeology from the period when frontend optimization was often a Java jar in a build directory. It sits between tiny text filters such as JSMin and modern JavaScript bundler/minifier stacks, and it explains why many old packages still have yuicompressor hooks.

It also shows how a once-central tool can survive as a compatibility package: the web moved on to UglifyJS, terser, esbuild, SWC, and bundlers, but package collections keep YUI Compressor available for old build recipes and reproducible maintenance work.

时间线

  • 2008-12-05: The public GitHub repository for yui/yuicompressor is created.
  • 2008-2010: The 2.x changelog records active fixes around JavaScript parsing, CSS compression, source compatibility, and batch workflows.
  • 2013-07-03: GitHub release v2.4.8, named Greendale, is published.
  • 2021-09-15: GitHub metadata shows the repository's most recent push before the 2026 enrichment run.

Related projects

  • YUI Library is the Yahoo frontend library whose performance culture helped drive the compressor.
  • Mozilla Rhino is the JavaScript engine/tokenizer lineage used by YUI Compressor, with local modifications documented in the README.
  • JSMin, the Dojo compressor, and Dean Edwards' Packer are named by the official project page as contemporary JavaScript minification tools.

安全态势

风险级别:blue

broad file, network, media, or database tool signal.

风险分类器

blue 风险 · 中 置信度 · tool

原因

  • broad file, network, media, or database tool signal

信号

  • text:compress

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 1 个平台目标。
  • 安装时包含 1 个运行时依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
yuicompressorcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本2.4.8
管理器更新时间
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/yui/yuicompressor

安装元数据

软件包元数据

软件包键brew:yuicompressor
版本2.4.8
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/yuicompressor
主页https://yui.github.io/yuicompressor/
仓库https://github.com/yui/yuicompressor
上游文档https://github.com/yui/yuicompressor#readme
许可证BSD-3-Clause
源码归档https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip
依赖openjdk
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameyuicompressor
Version Scheme0
Revision1
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

yuicompressor

nix profile install nixpkgs#yuicompressor
  • normalized package name match
  • 匹配方式:Yuicompressor
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/yu/yuicompressor/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
MacPorts95%

yuicompressor

sudo port install yuicompressor
  • normalized package name match
  • 匹配方式:Yuicompressor
MacPorts ports tree · api.github.com · MacPorts ports tree: www/yuicompressor/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment