Skip to content

Commit b85c759

Browse files
committed
feat(create-element): use https://registry.npmmirror.com for default npm registry
1 parent 76c6de8 commit b85c759

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

packages/create-element/HISOTRY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.1
2+
3+
- `feat` use https://registry.npmmirror.com for default npm registry
4+
15
## 1.1.0
26

37
- `feat` new option `beta` to use beta template packages

packages/create-element/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alilc/create-element",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "",
55
"main": "lib/index.js",
66
"bin": {

packages/create-element/src/base.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ export default class InitFunc {
4545
}
4646
installTpl() {
4747

48-
spawn.sync('npm', ['install', `${this.templatePkg}${this.useBeta ? '@beta' : ''}`, '--no-save', '--no-package-lock', '--no-shrinkwrap'], { stdio: 'inherit', cwd: this.installPath });
48+
spawn.sync('npm', [
49+
'install',
50+
`${this.templatePkg}${this.useBeta ? '@beta' : ''}`,
51+
'--no-save',
52+
'--no-package-lock',
53+
'--no-shrinkwrap',
54+
'--registry=https://registry.npmmirror.com',
55+
], { stdio: 'inherit', cwd: this.installPath });
4956
}
5057

5158
renderTpl() {

0 commit comments

Comments
 (0)