A CLI tool to make Taobao's npm mirror sync your package immediately.

Overview

npm-mirror-sync

A CLI tool to make Taobao's npm mirror sync your package immediately.

让淘宝的 NPM 镜像立即收录你的包的新版本。

背景

相信国内小伙伴都在用淘宝的 NPM 镜像(npmmirror.com)作为安装源,速度确实更快。不过有时候也会有一个小烦恼——我自己维护的包发布到 NPM 官方仓库后,镜像仓库并不会立刻同步,可能要等好几分钟才能生效。

幸好淘宝 NPM 镜像提供了一个同步网页,我们可以通过它来手动同步指定的包。于是我写了这个命令行工具来简化这个操作。小巧快捷,简单易用,相信你也用得到。

使用方法

  1. 全局安装这个包 [注]

    npm i -g npm-mirror-sync
  2. 在你的包里为 package.json 添加如下脚本:

    {
    	"scripts": {
    		"postpublish": "npx npm-mirror-sync"
    	}
    }
  3. 这样就可以了。以后每次发布新版后,这个脚本就会自动打开淘宝 NPM 镜像的同步网页,让你发的新版立即生效。

[注] 其实这一步并不是必须的,因为 npx 可以自动安装本地不存在的包。但从 npm@7 开始,npx 在自动安装包时需要用户在命令行手动确认,体验并不顺畅,因此还是建议先全局安装。资深用户自行取舍吧。


License

MIT

You might also like...

Mirror from https://github.com/BochilGaming/games-wabot/tree/multi-device

Games-Wabot Join Group Diskusi NO BOT Deploy to Heroku Heroku Buildpack BuildPack LINK FFMPEG here IMAGEMAGICK here FOR TERMUX USER Type mentioned bel

Dec 20, 2022

A high-speed download mirror list of common software for Chinese users.

cdMir mir.ug0.ltd 介绍 这是一个软件镜像站,旨在通过搜集或搭建镜像的方式,为处于中国大陆的用户提供高速下载服务。 如果您需要软件并未被 cdMir 收录,请联系我们(包括但不限于 发布Issues、社交媒体联系、邮箱联系),我们会考虑并添加。 如果您认为我们值得支持,请 star

Dec 29, 2022

This Lens Protocol module allows you to create a Transparent Promotion system in which the post creator can add a reward for who (ex: influencers) mirror it.

promote-module (in progress) This Lens Protocol module allows you to create a Transparent Promotion system in which the post creator can add a reward

Oct 2, 2022

Detect npm packages by author name in your package-lock.json or yarn.lock.

detect-package-by-author Detect npm packages by author name in your package-lock.json or yarn.lock. Install Install with npm: # Not Yet Publish # npm

Jan 11, 2022

🛫 TypeScript Starter template to simplify creating your next npm package.

TypeScript Starter Kit This is an opinionated TypeScript Starter kit to help kick-start development of your next npm package. 💡 Get Started Luckily,

Sep 27, 2022

🛫 TypeScript Starter template to simplify creating your next npm package.

TypeScript Starter Kit This is an opinionated TypeScript Starter kit to help kick-start development of your next npm package. 💡 Get Started Luckily,

May 19, 2022

Repo for tricking NPM into not hoisting your package. No dependencies and a warning if imported.

noist (Short for No Hoist) Repo for tricking NPM into not hoisting your package. No dependencies and a warning if imported. Why? As of npm@7 NPM suppo

Oct 27, 2022

☁️ Publish your npm package to a GitHub repository branch

git-publish Publish your npm package to a Git branch. Support this project by ⭐️ starring and sharing it. Follow me to see what other cool projects I'

Oct 21, 2022

Show npm package authors and maintainers of your dependencies and devDependencies.

your-deps-authors Show npm package authors and maintainers of your dependencies and devDependencies. Usage $ npx your-deps-authors ╔══════════════════

Sep 29, 2022
Releases(1.0.0)
Owner
CSS魔法
《CSS 揭秘》译者,QCon 讲师,CSS Conf 讲师,前百姓网前端架构师,微信公众号 “CSS魔法”。
CSS魔法
A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Jean Rodríguez 7 Sep 13, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
npm i uuid, npm i nodemon, npm i commander

goit-nodejs-hw-01 Получаем и выводим весь список контактов в виде таблицы (console.table) node index.js --action list Получаем контакт по id node inde

Oksana Banshchykova 3 Jul 5, 2022
mirrord lets you easily mirror traffic from your production environment to your development environment.

mirrord lets you easily mirror traffic from your Kubernetes cluster to your development environment. It comes as both Visual Studio Code extension and a CLI tool.

MetalBear 2.1k Dec 24, 2022
This tool allows you to test your chains.json file to see if your chains are available, syncing, or in sync.

Chains Tester This tool allows you to test your chains.json file to see if your chains are available, syncing, or in sync. This is an open source tool

Jorge S. Cuesta 9 Nov 4, 2022
Open source project that make it easy to sync your calendars in real time.

Syncit 2.0 - We make it easy to sync your calendars in real time. This is an Open source project! Installation Run yarn in order to install all depend

Tikal Knowledge, Ltd. 6 Dec 15, 2022
portfolio-project is a npm package to automatically update your projects section in your portfolio website. It will fetch the selected repositories directly from your GitHub account.

portfolio-project Those days of manually updating portfolio website after every new project made are gone ⚡ Yesss . . . you read that right. ?? portfo

Gaurav Gulati 15 Aug 3, 2021
official github mirror of gg-struggle

gg-struggle tl;dr gg-struggle is a program that reduces loading times by caching the Guilty Gear server responses, reducing slowdowns caused by latenc

cybermelon 28 Mar 12, 2022
MagicMirror² is an open source modular smart mirror platform

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant.

Michael Teeuw 17.3k Dec 29, 2022
Awesome mirror.xyz.

优质 Mirror 信息源列表 目录 Mirror 信息源列表 什么是 Mirror 如何提交 为什么要收集这张列表 Mirror 信息源列表 列表上的信息源订阅数不多,暂时取消展示 RSS 订阅数。 简介 订阅链接 标签 Shawn https://submirror.xyz/dao4ever.e

Robin Wen 28 Nov 7, 2022