Skip to content

Commit

Permalink
fix: 新增 tyarn, tpnpm, tpnpx 命令
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 5, 2023
1 parent 5b8b26d commit 77d4072
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ pnpm add --global tbify

对于常用的包管理命令,`tbify` 提供了使用淘宝 NPM 镜像的等价命令,除了发布包到 npm 时必须使用 `npm publish` 外,都可以使用等价命令进行相关操作:

| 原命令 | 使用淘宝 NPM 镜像的命令 | 示例 |
| ------ | ----------------------- | --------------------- |
| `nvm` | `tnvm` (或 `tbify nvm`) | `tnvm install 8.0.0` |
| `npm` | `tnpm` (或 `tbify npm`) | `tnpm install react` |
| `npx` | `tnpx` (或 `tbify npx`) | `tnpx kill-port 3000` |
| `yarn` | `tyn` (或 `tbify yarn`) | `tyn add react` |
| `pnpm` | `tpm` (`tbify pnpm`) | `tpm add react` |
| `pnpx` | `tpx` (或 `tbify pnpx`) | `tpx kill-port 3000` |
| 原命令 | 使用淘宝 NPM 镜像的命令 | 示例 |
| ------ | ----------------------------------------------------------------------------- | --------------------- |
| `nvm` | `tnvm` / `tbify nvm` | `tnvm install 8.0.0` |
| `npm` | `tnpm` / `tbify npm` | `tnpm install react` |
| `npx` | `tnpx` / `tbify npx` | `tnpx kill-port 3000` |
| `yarn` | `tyn` / `tyarn` / `tbify yarn` | `tyn add react` |
| `pnpm` | `tpm` (Windows 下该命令被系统占用,请使用后面的替代) / `tpnpm` / `tbify pnpm` | `tpm add react` |
| `pnpx` | `tpx` / `tpnpx` / `tbify pnpx` | `tpx kill-port 3000` |

对于其他命令,在使用时加上 `tbify` 前缀即可,比如:

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"tnpx": "lib/alias/npx.js",
"tnvm": "lib/alias/nvm.js",
"tpm": "lib/alias/pnpm.js",
"tpnpm": "lib/alias/pnpm.js",
"tpnpx": "lib/alias/pnpx.js",
"tpx": "lib/alias/pnpx.js",
"tyarn": "lib/alias/yarn.js",
"tyn": "lib/alias/yarn.js"
},
"files": [
Expand Down Expand Up @@ -79,7 +82,7 @@
"shx": "^0.3.2",
"standard-version": "^7.1.0",
"tempy": "^0.5.0",
"typescript": "^5.1.6"
"typescript": "^4"
},
"engines": {
"node": ">=10.19.0"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7049,10 +7049,10 @@ typedarray@^0.0.6:
resolved "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==

typescript@^5.1.6:
version "5.1.6"
resolved "https://registry.npmmirror.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274"
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
typescript@^4:
version "4.9.5"
resolved "https://registry.npmmirror.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

uglify-js@^3.1.4:
version "3.17.4"
Expand Down

0 comments on commit 77d4072

Please sign in to comment.