@iyowei/sweep-node-modules-cli 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +10 -6
- package/README.zh-CN.md +10 -6
- package/dist/cli.js +785 -210
- package/dist/manifest.json +3 -3
- package/package.json +2 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
# sweep-node-modules
|
|
1
|
+
# sweep-node-modules-cli
|
|
2
2
|
|
|
3
3
|
[](https://github.com/iyowei/sweep-node-modules/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@iyowei/sweep-node-modules-cli)
|
|
5
|
+
[](https://www.npmjs.com/package/@iyowei/sweep-node-modules-cli)
|
|
6
|
+

|
|
7
|
+

|
|
4
8
|
|
|
5
9
|
**English** | [中文](README.zh-CN.md)
|
|
6
10
|
|
|
@@ -55,10 +59,10 @@ bun install -g @iyowei/sweep-node-modules-cli
|
|
|
55
59
|
# clone, then cd into the repo root (adjust the path to your clone location)
|
|
56
60
|
cd "<your clone>/sweep-node-modules"
|
|
57
61
|
|
|
58
|
-
chmod +x packages/cli/bin/sweep-nm
|
|
62
|
+
chmod +x packages/sweep-node-modules-cli/bin/sweep-nm
|
|
59
63
|
|
|
60
64
|
# symlink it into ~/.local/bin (usually already on PATH); the launcher picks the runtime
|
|
61
|
-
ln -sf "$PWD/packages/cli/bin/sweep-nm" ~/.local/
|
|
65
|
+
ln -sf "$PWD/packages/sweep-node-modules-cli/bin/sweep-nm" ~/.local/bin/sweep-nm
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
**Windows** (PowerShell):
|
|
@@ -66,7 +70,7 @@ ln -sf "$PWD/packages/cli/bin/sweep-nm" ~/.local/packages/cli/bin/sweep-nm
|
|
|
66
70
|
```powershell
|
|
67
71
|
# add the repo's bin directory to your user PATH; one-time, effective after reopening the terminal
|
|
68
72
|
# adjust the path to your actual clone location (the launcher locates src relative to itself, so the script cannot be copied out on its own)
|
|
69
|
-
$bin = "$env:USERPROFILE\tools\sweep-node-modules\packages\cli\bin"
|
|
73
|
+
$bin = "$env:USERPROFILE\tools\sweep-node-modules\packages\sweep-node-modules-cli\bin"
|
|
70
74
|
[Environment]::SetEnvironmentVariable(
|
|
71
75
|
'Path',
|
|
72
76
|
[Environment]::GetEnvironmentVariable('Path', 'User') + ";$bin",
|
|
@@ -77,9 +81,9 @@ $bin = "$env:USERPROFILE\tools\sweep-node-modules\packages\cli\bin"
|
|
|
77
81
|
> Or skip the command line: add the `bin` directory to your user `Path` under System Properties → Environment Variables.
|
|
78
82
|
|
|
79
83
|
- **Requires**: bun or node, either works (the launcher is a shell / cmd script run by the OS; it does not depend on node)
|
|
80
|
-
- The most direct entry point; afterwards just run `sweep-nm` (on Windows via `packages\cli\bin\sweep-nm.cmd`)
|
|
84
|
+
- The most direct entry point; afterwards just run `sweep-nm` (on Windows via `packages\sweep-node-modules-cli\bin\sweep-nm.cmd`)
|
|
81
85
|
|
|
82
|
-
> The tool also ships an API package, `@iyowei/sweep-node-modules
|
|
86
|
+
> The tool also ships an API package, [`@iyowei/sweep-node-modules`](https://www.npmjs.com/package/@iyowei/sweep-node-modules), for use in your own programs or scripts (usage is documented in that package).
|
|
83
87
|
|
|
84
88
|
## Usage
|
|
85
89
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
# sweep-node-modules
|
|
1
|
+
# sweep-node-modules-cli
|
|
2
2
|
|
|
3
3
|
[](https://github.com/iyowei/sweep-node-modules/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@iyowei/sweep-node-modules-cli)
|
|
5
|
+
[](https://www.npmjs.com/package/@iyowei/sweep-node-modules-cli)
|
|
6
|
+

|
|
7
|
+

|
|
4
8
|
|
|
5
9
|
[English](README.md) | **中文**
|
|
6
10
|
|
|
@@ -55,10 +59,10 @@ bun install -g @iyowei/sweep-node-modules-cli
|
|
|
55
59
|
# 克隆后进入仓库根 (路径按你的实际位置调整)
|
|
56
60
|
cd "<克隆位置>/sweep-node-modules"
|
|
57
61
|
|
|
58
|
-
chmod +x packages/cli/bin/sweep-nm
|
|
62
|
+
chmod +x packages/sweep-node-modules-cli/bin/sweep-nm
|
|
59
63
|
|
|
60
64
|
# 软链进 ~/.local/bin (通常已在 PATH 中), 启动器会挑选运行时
|
|
61
|
-
ln -sf "$PWD/packages/cli/bin/sweep-nm" ~/.local/
|
|
65
|
+
ln -sf "$PWD/packages/sweep-node-modules-cli/bin/sweep-nm" ~/.local/bin/sweep-nm
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
**Windows** (PowerShell):
|
|
@@ -66,7 +70,7 @@ ln -sf "$PWD/packages/cli/bin/sweep-nm" ~/.local/packages/cli/bin/sweep-nm
|
|
|
66
70
|
```powershell
|
|
67
71
|
# 把仓库的 bin 目录加入用户 PATH, 只需一次, 重开终端后生效
|
|
68
72
|
# 路径按你的实际克隆位置调整 (启动器靠自身位置定位 src, 故不能把脚本单独复制走)
|
|
69
|
-
$bin = "$env:USERPROFILE\tools\sweep-node-modules\packages\cli\bin"
|
|
73
|
+
$bin = "$env:USERPROFILE\tools\sweep-node-modules\packages\sweep-node-modules-cli\bin"
|
|
70
74
|
[Environment]::SetEnvironmentVariable(
|
|
71
75
|
'Path',
|
|
72
76
|
[Environment]::GetEnvironmentVariable('Path', 'User') + ";$bin",
|
|
@@ -77,9 +81,9 @@ $bin = "$env:USERPROFILE\tools\sweep-node-modules\packages\cli\bin"
|
|
|
77
81
|
> 也可以不经命令行: 在「系统属性 → 环境变量」里把该 `bin` 目录加到用户变量 `Path` 中。
|
|
78
82
|
|
|
79
83
|
- **需要**: bun 或 node 任一 (启动器是 shell / cmd 脚本, 由系统执行, 不依赖 node)
|
|
80
|
-
- 特点: 入口最直接; 之后直接敲 `sweep-nm` (Windows 经 `packages\cli\bin\sweep-nm.cmd`)
|
|
84
|
+
- 特点: 入口最直接; 之后直接敲 `sweep-nm` (Windows 经 `packages\sweep-node-modules-cli\bin\sweep-nm.cmd`)
|
|
81
85
|
|
|
82
|
-
> 本工具同时提供可编程 API 包 `@iyowei/sweep-node-modules
|
|
86
|
+
> 本工具同时提供可编程 API 包 [`@iyowei/sweep-node-modules`](https://www.npmjs.com/package/@iyowei/sweep-node-modules), 供在程序或脚本中调用 (用法见该包文档)。
|
|
83
87
|
|
|
84
88
|
## 使用
|
|
85
89
|
|