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",