Skip to content

Commit 927ebf2

Browse files
docs: 更新 README 和配置文件,调整 npm 源设置
1 parent 8474c0c commit 927ebf2

3 files changed

Lines changed: 20 additions & 6 deletions

File tree

TMLSPEC-cli/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,22 @@ node ./bin/tml-spec.js init
1919
发布后可从指定 Verdaccio 源全局安装:
2020

2121
```bash
22-
npm install -g tmlspec-cli --registry https://gaq0noe1.cn-nb1.rainapp.top/
22+
npm config set @tml:registry https://gaq0noe1.cn-nb1.rainapp.top/
23+
npm install -g @tml/tmlspec-cli
2324
tml-spec init
2425
```
2526

26-
如果希望后续安装默认走该源,也可以先执行
27+
建议保留默认公共源,让第三方依赖继续从 npm 官方源下载
2728

2829
```bash
29-
npm config set registry https://gaq0noe1.cn-nb1.rainapp.top/
30+
npm config set registry https://registry.npmjs.org/
31+
```
32+
33+
如果希望直接写入 .npmrc,也可以使用:
34+
35+
```ini
36+
registry=https://registry.npmjs.org/
37+
@tml:registry=https://gaq0noe1.cn-nb1.rainapp.top/
3038
```
3139

3240
## 生成结果

TMLSPEC-cli/package-lock.json

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TMLSPEC-cli/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "tmlspec-cli",
2+
"name": "@tml/tmlspec-cli",
33
"version": "0.1.0",
44
"description": "Inject project and requirement command files for team workflows.",
55
"type": "module",
@@ -27,6 +27,9 @@
2727
"engines": {
2828
"node": ">=18.18"
2929
},
30+
"publishConfig": {
31+
"registry": "https://gaq0noe1.cn-nb1.rainapp.top/"
32+
},
3033
"dependencies": {
3134
"@inquirer/prompts": "^7.8.4",
3235
"commander": "^13.1.0"

0 commit comments

Comments
 (0)