File tree 2 files changed +59
-16
lines changed 2 files changed +59
-16
lines changed Original file line number Diff line number Diff line change 9
9
1 . 安装 UI 库
10
10
11
11
``` shell
12
- <<< <<< < HEAD
13
12
npm install litos-ui-vue
14
- =======
15
- npm install @asteres/litos-ui-vue
16
- >>>>>>> 45a3da1c (chore: v0.0.1)
17
13
```
18
14
19
15
2 . 安装自动导入插件
@@ -29,11 +25,7 @@ import { defineConfig } from 'vite';
29
25
import vue from ' @vitejs/plugin-vue' ;
30
26
import AutoImport from ' unplugin-auto-import/vite' ;
31
27
import Components from ' unplugin-vue-components/vite' ;
32
- <<<<<< < HEAD
33
28
import LitosUiResolver from ' litos-ui-vue-resolver' ;
34
- ====== =
35
- import NeatuiResolver from ' litos-ui-vue-resolver' ;
36
- >>>>>> > 45a3da1c (chore: v0.0 .1 )
37
29
38
30
// https://vitejs.dev/config/
39
31
export default defineConfig ({
@@ -56,20 +48,12 @@ export default defineConfig({
56
48
在 ` main.ts ` 中引入全局 CSS 变量文件
57
49
58
50
``` js
59
- <<<<<< < HEAD
60
51
import ' litos-ui-vue/style/vars.css' ;
61
- ====== =
62
- import ' @asteres/litos-ui-vue/style/vars.css' ;
63
- >>>>>> > 45a3da1c (chore: v0.0 .1 )
64
52
```
65
53
66
54
## 文档
67
55
68
- <<<<<<< HEAD
69
56
[ 中文文档] ( https://dvshu.github.io/litos-ui-vue/ )
70
- =======
71
- [ 中文 文档] ( https://dvshu.github.io/litos-ui-vue/ )
72
- >>>>>>> 45a3da1c (chore: v0.0.1)
73
57
74
58
## [ 更新记录] ( https://github.com/DvShu/litos-ui-vue/blob/main/CHANGELOG.md )
75
59
Original file line number Diff line number Diff line change
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 ++ ;
You can’t perform that action at this time.
0 commit comments