Skip to content

Commit

Permalink
feat: 切换初始化模板获取淘宝源仓库地址切换
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamCaoQAQ committed Feb 5, 2024
1 parent d5a1d6e commit 4932992
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-init/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class InitPlugin extends Plugin{
let result = '{}'
let templateName = `@hummer/cli-${answers.template}`
try {
result = execSync(`npm view ${templateName} dist-tags --json --registry=https://registry.npm.taobao.org/`, {
result = execSync(`npm view ${templateName} dist-tags --json --registry=https://registry.npmmirror.com/`, {
stdio: [null],
timeout: 5000
}).toString();
Expand All @@ -96,7 +96,7 @@ export class InitPlugin extends Plugin{

if (!fse.pathExistsSync(templateDir)) {
fse.ensureDirSync(templateDir)
execSync(`npm pack ${templateName}@${latestversion} --registry=https://registry.npm.taobao.org/`, {
execSync(`npm pack ${templateName}@${latestversion} --registry=https://registry.npmmirror.com/`, {
cwd: templateDir,
stdio: ['pipe', 'ignore'],
timeout: 20000
Expand Down

0 comments on commit 4932992

Please sign in to comment.