fjc0k / Tbify
Licence: mit
使用淘宝镜像运行命令: tbify [nvm|npm|npx|yarn|pnpm|...]
Stars: ✭ 153
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Tbify
Yarn
The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
Stars: ✭ 40,325 (+26256.21%)
Mutual labels: npm, package-manager, yarn
Bolt
⚡️ Super-powered JavaScript project management
Stars: ✭ 2,134 (+1294.77%)
Mutual labels: npm, package-manager, yarn
Website
Yarn package manager website
Stars: ✭ 374 (+144.44%)
Mutual labels: npm, package-manager, yarn
Tiny Package Manager
Learn how npm or Yarn v1 works.
Stars: ✭ 125 (-18.3%)
Mutual labels: npm, package-manager, yarn
Awesome Npm
Awesome npm resources and tips
Stars: ✭ 3,894 (+2445.1%)
Mutual labels: npm, package-manager, yarn
Npminstall
Make `npm install` fast and easy.
Stars: ✭ 374 (+144.44%)
Mutual labels: npm, package-manager, yarn
Benchmarks Of Javascript Package Managers
Benchmarks of JavaScript Package Managers
Stars: ✭ 388 (+153.59%)
Mutual labels: npm, package-manager, yarn
Have It
The fastest NPM install does nothing because you already have it
Stars: ✭ 75 (-50.98%)
Mutual labels: npm, yarn
Emma Cli
📦 Terminal assistant to find and install node packages.
Stars: ✭ 1,201 (+684.97%)
Mutual labels: npm, yarn
Yarn.msbuild
MSBuild integration for the Yarn package manager.
Stars: ✭ 57 (-62.75%)
Mutual labels: npm, yarn
Node Developer Boilerplate
🍭 Boilerplate for ES6+ Node.js and npm Developer
Stars: ✭ 82 (-46.41%)
Mutual labels: npm, yarn
Floatsidebar.js
Lightweight (2kb gzipped), zero-dependency javascript library for making float sidebars based on the finite state machine
Stars: ✭ 56 (-63.4%)
Mutual labels: npm, yarn
Cheatsheets
A curated list of everything I look up more than twice
Stars: ✭ 109 (-28.76%)
Mutual labels: npm, yarn
Gitpkg
use a sub directory of a github repo as yarn / npm dependency directly
Stars: ✭ 54 (-64.71%)
Mutual labels: npm, yarn
Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (-15.69%)
Mutual labels: npm, yarn
tbify
使用 淘宝 NPM 镜像 加速包管理工具安装依赖的速度。
原理
基于环境变量对国内请求速度欠佳的资源地址进行了替换,具体分为两点:
- 通过环境变量令包管理工具(
npm
、npx
、yarn
、pnpm
、pnpx
)使用淘宝源安装依赖; - 通过环境变量令诸如
nvm
、node-sass
、Electron
、Puppeteer
、Cypress
、Sharp
等包使用淘宝镜像安装其自身所需资源。
以上,本工具对包管理工具本身零侵入,同时,对环境变量的设置也是一次性的,并不会产生任何的副作用,请放心使用。
安装
# npm
npm install tbify --global
# yarn
yarn global add tbify
# pnpm
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 |
对于其他命令,在使用时加上 tbify
前缀即可,比如:
tbify printenv npm_config_registry
# -> https://r.npm.taobao.org
鸣谢
正所谓前人栽树后人乘凉,感谢 @fengmk2 大佬及 cnpm 团队 为提供一个优质国内镜像所作出的努力!👍
同时本工具从 @yiminghe 大佬的 tyarn 项目借鉴了很多思路,一并表示感谢!💐
许可
Jay Fong (c) MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].