8000 docs: 修复文档 · DvShu/litos-ui-vue@d16d534 · GitHub
[go: up one dir, main page]

Skip to content

Commit d16d534

Browse files
author
Tenny
committed
docs: 修复文档
1 parent b05934c commit d16d534

File tree

2 files changed

+59
-16
lines changed

2 files changed

+59
-16
lines changed

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
1. 安装 UI 库
1010

1111
```shell
12-
<<<<<<< HEAD
1312
npm install litos-ui-vue
14-
=======
15-
npm install @asteres/litos-ui-vue
16-
>>>>>>> 45a3da1c (chore: v0.0.1)
1713
```
1814

1915
2. 安装自动导入插件
@@ -29,11 +25,7 @@ import { defineConfig } from 'vite';
2925
import vue from '@vitejs/plugin-vue';
3026
import AutoImport from 'unplugin-auto-import/vite';
3127
import Components from 'unplugin-vue-components/vite';
32-
<<<<<<< HEAD
3328
import LitosUiResolver from 'litos-ui-vue-resolver';
34-
=======
35-
import NeatuiResolver from 'litos-ui-vue-resolver';
36-
>>>>>>> 45a3da1c (chore: v0.0.1)
3729

3830
// https://vitejs.dev/config/
3931
export default defineConfig({
@@ -56,20 +48,12 @@ export default defineConfig({
5648
`main.ts` 中引入全局 CSS 变量文件
5749

5850
```js
59-
<<<<<<< HEAD
6051
import 'litos-ui-vue/style/vars.css';
61-
=======
62-
import '@asteres/litos-ui-vue/style/vars.css';
63-
>>>>>>> 45a3da1c (chore: v0.0.1)
6452
```
6553

6654
## 文档
6755

68-
<<<<<<< HEAD
6956
[中文文档](https://dvshu.github.io/litos-ui-vue/)
70-
=======
71-
[中文 文档](https://dvshu.github.io/litos-ui-vue/)
72-
>>>>>>> 45a3da1c (chore: v0.0.1)
7357

7458
## [更新记录](https://github.com/DvShu/litos-ui-vue/blob/main/CHANGELOG.md)
7559

scripts/publish.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import { spawn } from 'node:child_process';
2+
3+
/*
4+
步骤:
5+
1. 切换到主分支: gi t checkout main
6+
2. rebase dev -> main: git rebase dev
7+
3. 获取提交信息: git log --format="%H--%s" -n 10
8+
4. 修改 changelog、package.json 版本号
9+
5. 提交: git commit -m "chore: release v1.0.0"
10+
6. 上传: git push origin main
11+
7. 构建: pnpm lib:build
12+
8. 发布: npm publish --registry https://registry.npmjs.org/
13+
9. 切换回 dev分支: git checkout dev
14+
*/
15+
16+
// 启动一个持久化的 shell 进程
17+
const shell = spawn('powershell.exe', {
18+
shell: true,
19+
windowsHide: true,
20+
});
21+
22+
let step = 0;
23+
24+
const commitHistory = []
25+
26+
// 监听输出
27+
shell.stdout.on('data', (data) => {
28+
if (step === 2) {
29+
// 获取提交信息成功
30+
commitHistory.push(data);
31+
}
32+
step++;
33+
});
34+
35+
shell.stdout.on('end', () => {
36+
switch (step) {
37+
case 0:
38+
// 切换到主分支// 切换到主分支成功后, 使用 rebase 合并 dev -> main
39+
shell.stdin.write('git rebase dev\n');
40+
break;
41+
case 1:
42+
// 合并 dev -> main 成功后, 获取历史提交信息
43+
shell.stdin.write('git log --format="%H--%s" -n 10\n');
44+
break;
45+
case 2:
46+
// 获取提交信息成功
47+
console.log(commitHistory);
48+
break;
49+
}
50+
})
51+
52+
shell.stderr.on('data', (data) => {
53+
console.error(`stderr: ${data}`);
54+
shell.stdin.end();
55+
});
56+
57+
// 1. 切换到主分支
58+
shell.stdin.write('git checkout main\n');
59+
step++;

0 commit comments

Comments
 (0)
0