0.3.1 • Published 3 years ago
npm-csr v0.3.1
npm-csr
快速切换 npm 源
动机 🦕
不想每次记住太长的镜像地址
使用 🦖
安装
npm i npm-csr -g命令式
获取
# 获取当前源
npm-csr切换 npm
# 切换为 npm 源
npm-csr npm切换 cnpm
# 切换为 cnpm 源
npm-csr cnpm编程式
const {
setNpmRegistry,
getCurrentNpmRegistry,
} = require("npm-csr");
// 切换为 npm 源
await setNpmRegistry("npm");
// 切换为 cnpm 源
await setNpmRegistry("cnpm");
// 获取当前 npm 源
await getCurrentNpmRegistry();License
Made with markthree
Published under MIT License.