From dc38076476fb903fb49e70436fd92c0f7023e70c Mon Sep 17 00:00:00 2001 From: ASLant <77436463+Y-ASLant@users.noreply.github.com> Date: Wed, 7 Oct 2026 11:29:58 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=9D=99=E9=BB=98=20just=20=E4=B8=8E?= =?UTF-8?q?=E4=BE=BF=E6=90=BA=E7=89=88=E6=9E=84=E5=BB=BA=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .justfile 启用 set quiet 隐藏命令回显,并导出 npm_config_loglevel=warn 隐藏 npm notice;post-build 脚本将 New-Item 目录对象送入 Out-Null。同步更新 CLAUDE.md 与 README.md 说明。 --- .justfile | 6 +++++- CLAUDE.md | 2 ++ README.md | 2 ++ package.json | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.justfile b/.justfile index 62bd8d8..69bf368 100644 --- a/.justfile +++ b/.justfile @@ -1,8 +1,12 @@ # UPX-Tools 常用命令,运行 `just` 或 `just --list` 查看全部 +set quiet + +export npm_config_loglevel := 'warn' + [private] default: - @just --list + just --list # 开发模式运行(热重载,先编译一次 Tailwind CSS) dev: css diff --git a/CLAUDE.md b/CLAUDE.md index 47b3c22..45638f0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -61,6 +61,8 @@ cargo clippy --manifest-path src-tauri/Cargo.toml cargo test --manifest-path src-tauri/Cargo.toml ``` +`.justfile` 使用 `set quiet` 隐藏命令回显,并导出 `npm_config_loglevel=warn` 隐藏 npm notice(包括嵌套调用);保留工具输出、警告和错误。`post-build` 仅将 `New-Item` 的目录对象输出送入 `Out-Null`,不重定向错误。 + ## 代码结构 ### 前端 (ui/) diff --git a/README.md b/README.md index c9513d9..04b75d7 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,8 @@ npm run watch:css 单独运行 ESLint 自动修复等细项时,使用下面的 npm/Cargo 命令,不再提供重复的 just 入口。 +just 默认不回显执行命令,并为子进程设置 `npm_config_loglevel=warn`,隐藏 npm 的 `notice run`;便携版复制不打印 PowerShell 目录对象。工具自身的进度、产物路径、警告和错误仍会显示。 + ### 代码检查与格式化 ```bash diff --git a/package.json b/package.json index 01693fe..954dcb9 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build:css": "npx tailwindcss -i ./ui/css/main.css -o ./ui/css/tailwind.css --minify", "watch:css": "npx tailwindcss -i ./ui/css/main.css -o ./ui/css/tailwind.css --watch", "build": "cargo tauri build && npm run post-build", - "post-build": "powershell -Command \"New-Item -Path 'src-tauri/target/release/bundle/Portable' -ItemType Directory -Force; Copy-Item 'src-tauri/target/release/UPX-Tools.exe' 'src-tauri/target/release/bundle/Portable/'\"" + "post-build": "powershell -Command \"New-Item -Path 'src-tauri/target/release/bundle/Portable' -ItemType Directory -Force | Out-Null; Copy-Item 'src-tauri/target/release/UPX-Tools.exe' 'src-tauri/target/release/bundle/Portable/'\"" }, "devDependencies": { "@eslint/js": "^9.39.2",