npm-csr
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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.


Readme

Keywords

Package Sidebar

Install

npm i npm-csr

Weekly Downloads

1

Version

0.3.1

License

MIT

Unpacked Size

119 kB

Total Files

9

Last publish

Collaborators

  • markthree