Skip to content

Commit 5e321ca

Browse files
committed
πŸŽ‰ feat(app): ζ›΄ζ–°
1 parent 7e13ec3 commit 5e321ca

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

β€Žsrc/common.tsβ€Ž

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
export const npmRegisters: Array<{
2+
key: string;
3+
value: string;
4+
}> = [
5+
{
6+
key: "npm",
7+
value: "https://registry.npmjs.org/",
8+
},
9+
{
10+
key: "yarn",
11+
value: "https://registry.yarnpkg.com/",
12+
},
13+
{
14+
key: "tencent",
15+
value: "https://mirrors.cloud.tencent.com/npm/",
16+
},
17+
{
18+
key: "cnpm",
19+
value: "https://r.cnpmjs.org/",
20+
},
21+
{
22+
key: "taobao",
23+
value: "https://registry.npmmirror.com/",
24+
},
25+
{
26+
key: "npmMirror",
27+
value: "https://skimdb.npmjs.com/registry/",
28+
},
29+
];
30+
export interface RegistryOptions {
31+
url: string;
32+
}

β€Žsrc/index.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import {
33
ACTIVATION,
44
execCommand,
55
loggerInfo,
6-
npmRegisters,
76
printInfo,
87
printWarring,
9-
RegistryOptions,
108
} from "code-genius";
119
import enquirer from "enquirer";
1210

11+
import { npmRegisters,RegistryOptions } from "./common";
12+
1313
const printCurrentRegistry = async (isBefore = true) => {
1414
printInfo(`${isBefore ? "当前" : "ζœ€ζ–°"} NPM ι•œεƒεœ°ε€οΌˆε…¨ε±€οΌ‰οΌš`);
1515
await execCommand("npm", ["config", "get", "registry", "-g"], {

0 commit comments

Comments
Β (0)