@xx-in/tools 0.0.1 → 0.0.3
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/README.md +35 -5
- package/dist/cli.js +452 -848
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -14,6 +14,34 @@ npm install -g @xx-in/tools
|
|
|
14
14
|
xx upgrade
|
|
15
15
|
# 或
|
|
16
16
|
npm install -g @xx-in/tools@latest
|
|
17
|
+
|
|
18
|
+
# 如果当前环境配置了其他 npm 源,可强制走官方源
|
|
19
|
+
xx upgrade -r
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 临时指定 npm 官方源
|
|
23
|
+
|
|
24
|
+
如果你本机默认配置了其他 npm 源,安装、升级或发布时可以临时指定官方源,而不影响全局配置:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
# 安装
|
|
28
|
+
npm --registry=https://registry.npmjs.org/ install -g @xx-in/tools
|
|
29
|
+
|
|
30
|
+
# 升级
|
|
31
|
+
npm --registry=https://registry.npmjs.org/ install -g @xx-in/tools@latest
|
|
32
|
+
|
|
33
|
+
# 发布
|
|
34
|
+
npm --registry=https://registry.npmjs.org/ publish --access public
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
也可以直接使用项目内置脚本:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
# 常规发布
|
|
41
|
+
npm run publish:npm
|
|
42
|
+
|
|
43
|
+
# 强制走 npm 官方源发布
|
|
44
|
+
npm run publish:npm:registry
|
|
17
45
|
```
|
|
18
46
|
|
|
19
47
|
## 功能列表
|
|
@@ -37,12 +65,14 @@ npm install -g @xx-in/tools@latest
|
|
|
37
65
|
- **`open [path]`**:文件管理器目录打开工具。
|
|
38
66
|
- 在系统内置文件管理器中打开指定目录。若未提供参数,则默认打开当前的工作目录。
|
|
39
67
|
|
|
40
|
-
### 2.
|
|
68
|
+
### 2. macOS 本地工具安装管理
|
|
41
69
|
|
|
42
|
-
- **`
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
70
|
+
- **`install <path>`**:macOS 本地工具安装器。
|
|
71
|
+
- 支持安装单个可执行文件,以及 `.tar.gz`、`.tgz`、`.tar.xz`、`.txz`、`.tar` 压缩包。
|
|
72
|
+
- 自动安装到 `~/.xx-tools/apps/`,并在 `~/.xx-tools/bin/` 创建终端命令入口。
|
|
73
|
+
- 首次安装时会自动把 `~/.xx-tools/bin` 写入你的 Shell 配置,后续即可在终端中直接调用已安装工具。
|
|
74
|
+
- **`uninstall <package>`**:macOS 本地工具卸载器。
|
|
75
|
+
- 按安装名卸载工具,同时删除安装目录和终端命令入口。
|
|
46
76
|
|
|
47
77
|
### 3. 压缩与解压
|
|
48
78
|
|