-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97dace8
commit ff1e5be
Showing
7 changed files
with
500 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
/umap | ||
|
||
package-lock.json | ||
|
||
/tests/e2e/videos/ | ||
/tests/e2e/screenshots/ | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* | ||
|
||
package-lock.json | ||
|
||
build/env.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry = https://registry.npmjs.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
# 这是一个切换镜像源的库 | ||
|
||
安装建议加上-g | ||
|
||
npm i @front-base/snpm -g | ||
##### snpm ls 查看目前源 | ||
|
||
* npm------- https://registry.npmjs.org/ | ||
|
||
yarn------ https://registry.yarnpkg.com/ | ||
|
||
tencent--- https://mirrors.cloud.tencent.com/npm/ | ||
|
||
cnpm------ https://r.cnpmjs.org/ | ||
|
||
taobao---- https://registry.npmmirror.com/ | ||
|
||
npmMirror- https://skimdb.npmjs.com/registry/ | ||
|
||
##### snpm use 切换源 | ||
|
||
选择你要切换的源 | ||
|
||
##### snpm current 查看当前源 | ||
|
||
当前源: npm | ||
|
||
##### snpm add 添加源 | ||
|
||
1.输入添加的名称 | ||
2.输入源地址 | ||
|
||
##### snpm ping 测试源 | ||
|
||
? 请选择镜像 cnpm | ||
响应时长: 1635ms | ||
|
||
##### snpm delete 删除自定义源 | ||
|
||
add添加的源都可以删除 | ||
|
||
|
||
##### snpm rename 重命名 | ||
|
||
自定义添加的源都可以进行重新命名 | ||
|
||
##### snpm edit 编辑自定义镜像地址 | ||
|
||
# 用法 Usage | ||
|
||
Usage: snpm [options] [command] | ||
|
||
Options: | ||
|
||
-V, --version output the version number | ||
|
||
-h, --help display help for command | ||
|
||
|
||
Commands: | ||
ls 查看镜像 | ||
|
||
use 请选择镜像 | ||
|
||
current 查看当前源 | ||
|
||
ping 测试镜像地址速度 | ||
|
||
add 自定义镜像 | ||
|
||
delete 删除自定义的源 | ||
|
||
rename 重命名 | ||
|
||
edit 编辑自定义镜像地址 | ||
|
||
help [command] display help for command | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@front-base/snpm", | ||
"version": "0.0.1", | ||
"description": "npm 镜像管理工具", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"" | ||
}, | ||
"keywords": [ | ||
"nrm", | ||
"npm", | ||
"cnpm", | ||
"yarn" | ||
], | ||
"bin": { | ||
"snpm": "./src/index.js" | ||
}, | ||
"publicConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://gitee.com/NativeBase/func-package/tree/master/packages/snpm" | ||
}, | ||
"bugs": { | ||
"url": "https://gitee.com/NativeBase/func-package/issues" | ||
}, | ||
"author": "JiaoXiaoYuan", | ||
"license": "ISC", | ||
"dependencies": { | ||
"chalk": "^4.0.0", | ||
"commander": "^10.0.0", | ||
"inquirer": "^8.0.0", | ||
"node-http-ping": "^0.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
console.log(` | ||
_____ _____ _____ | ||
/\ \ /\ \ /\ \ | ||
/::\____\ /::\____\ /::\ \ | ||
/::::| | /::::| | /::::\ \ | ||
/:::::| | /:::::| | /::::::\ \ | ||
/::::::| | /::::::| | /:::/\:::\ \ | ||
/:::/|::| | /:::/|::| | /:::/__\:::\ \ | ||
/:::/ |::| | /:::/ |::| | /::::\ \:::\ \ | ||
/:::/ |::|___|______ /:::/ |::|___|______ /::::::\ \:::\ \ | ||
/:::/ |::::::::\ \ /:::/ |::::::::\ \ /:::/\:::\ \:::\____\ | ||
/:::/ |:::::::::\____\/:::/ |:::::::::\____\/:::/ \:::\ \:::| | | ||
\::/ / ~~~~~/:::/ /\::/ / ~~~~~/:::/ /\::/ \:::\ /:::|____| | ||
\/____/ /:::/ / \/____/ /:::/ / \/_____/\:::\/:::/ / | ||
/:::/ / /:::/ / \::::::/ / | ||
/:::/ / /:::/ / \::::/ / | ||
/:::/ / /:::/ / \::/____/ | ||
/:::/ / /:::/ / ~~ | ||
/:::/ / /:::/ / | ||
/:::/ / /:::/ / | ||
\::/ / \::/ / | ||
\/____/ \/____/ | ||
`) | ||
console.log('安装完之后使用snpm命令') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"npm": { | ||
"home": "https://www.npmjs.org", | ||
"registry": "https://registry.npmjs.org/", | ||
"ping": "https://registry.npmjs.org" | ||
}, | ||
"yarn": { | ||
"home": "https://yarnpkg.com", | ||
"registry": "https://registry.yarnpkg.com/", | ||
"ping": "https://registry.yarnpkg.com" | ||
}, | ||
"tencent": { | ||
"home": "https://mirrors.cloud.tencent.com/npm/", | ||
"registry": "https://mirrors.cloud.tencent.com/npm/", | ||
"ping": "https://mirrors.cloud.tencent.com/npm" | ||
}, | ||
"cnpm": { | ||
"home": "https://cnpmjs.org", | ||
"registry": "https://r.cnpmjs.org/", | ||
"ping": "https://r.cnpmjs.org" | ||
}, | ||
"taobao": { | ||
"home": "https://npmmirror.com", | ||
"registry": "https://registry.npmmirror.com/", | ||
"ping": "https://registry.npmmirror.com" | ||
}, | ||
"npmMirror": { | ||
"home": "https://skimdb.npmjs.com/", | ||
"registry": "https://skimdb.npmjs.com/registry/", | ||
"ping": "https://skimdb.npmjs.com/registry" | ||
} | ||
} |
Oops, something went wrong.