cmyr-template-cli 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plopfile.js
CHANGED
|
@@ -1271,6 +1271,15 @@ module.exports = function (plop) {
|
|
|
1271
1271
|
return answers.isOpenSource;
|
|
1272
1272
|
},
|
|
1273
1273
|
},
|
|
1274
|
+
{
|
|
1275
|
+
type: 'confirm',
|
|
1276
|
+
name: 'isEnableStarHistory',
|
|
1277
|
+
message: '是否启用 Star History ?',
|
|
1278
|
+
default: false,
|
|
1279
|
+
when(answers) {
|
|
1280
|
+
return answers.isOpenSource;
|
|
1281
|
+
},
|
|
1282
|
+
},
|
|
1274
1283
|
{
|
|
1275
1284
|
type: 'confirm',
|
|
1276
1285
|
name: 'isEnableAfdian',
|
package/package.json
CHANGED
|
@@ -11,23 +11,28 @@ jobs:
|
|
|
11
11
|
- uses: actions/checkout@v3
|
|
12
12
|
with:
|
|
13
13
|
persist-credentials: false
|
|
14
|
+
- name: Setup pnpm
|
|
15
|
+
uses: pnpm/action-setup@v2
|
|
16
|
+
with:
|
|
17
|
+
version: "latest"
|
|
14
18
|
- name: Setup Node.js environment
|
|
15
19
|
uses: actions/setup-node@v3
|
|
16
20
|
with:
|
|
17
21
|
node-version: "lts/*"
|
|
18
|
-
- name:
|
|
19
|
-
|
|
20
|
-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
|
21
|
-
- uses: actions/cache@v3
|
|
22
|
-
id: yarn-cache
|
|
22
|
+
- name: Cache Dependency
|
|
23
|
+
uses: actions/cache@v3
|
|
23
24
|
with:
|
|
24
|
-
path:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
path: |
|
|
26
|
+
~/.npm
|
|
27
|
+
~/cache
|
|
28
|
+
!~/cache/exclude
|
|
29
|
+
**/node_modules
|
|
30
|
+
key: pnpm-${{ runner.os }}-${{ hashFiles('package.json') }}
|
|
31
|
+
restore-keys: pnpm-${{ runner.os }}
|
|
32
|
+
- run: pnpm i --fix-lockfile
|
|
33
|
+
- run: pnpm run lint
|
|
34
|
+
- run: pnpm run build
|
|
30
35
|
- env:
|
|
31
36
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
32
37
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
33
|
-
run:
|
|
38
|
+
run: pnpm run release
|
|
@@ -6,19 +6,24 @@ jobs:
|
|
|
6
6
|
runs-on: ubuntu-latest
|
|
7
7
|
steps:
|
|
8
8
|
- uses: actions/checkout@v3
|
|
9
|
+
- name: Setup pnpm
|
|
10
|
+
uses: pnpm/action-setup@v2
|
|
11
|
+
with:
|
|
12
|
+
version: "latest"
|
|
9
13
|
- name: Setup Node.js@lts environment
|
|
10
14
|
uses: actions/setup-node@v3
|
|
11
15
|
with:
|
|
12
16
|
node-version: "lts/*"
|
|
13
|
-
- name:
|
|
14
|
-
|
|
15
|
-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
|
16
|
-
- uses: actions/cache@v3
|
|
17
|
-
id: yarn-cache
|
|
17
|
+
- name: Cache Dependency
|
|
18
|
+
uses: actions/cache@v3
|
|
18
19
|
with:
|
|
19
|
-
path:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
path: |
|
|
21
|
+
~/.npm
|
|
22
|
+
~/cache
|
|
23
|
+
!~/cache/exclude
|
|
24
|
+
**/node_modules
|
|
25
|
+
key: pnpm-${{ runner.os }}-${{ hashFiles('package.json') }}
|
|
26
|
+
restore-keys: pnpm-${{ runner.os }}
|
|
27
|
+
- run: pnpm i --fix-lockfile
|
|
28
|
+
- run: pnpm run lint
|
|
29
|
+
- run: pnpm run build
|
package/templates/README.md
CHANGED
|
@@ -41,21 +41,15 @@
|
|
|
41
41
|
<% } -%>
|
|
42
42
|
<% if (projectHomepage) { -%>
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
## 🏠 主页
|
|
45
45
|
|
|
46
46
|
[<%= projectHomepage %>](<%= projectHomepage %>)
|
|
47
47
|
|
|
48
48
|
<% } -%>
|
|
49
|
-
<% if (projectDemoUrl) { -%>
|
|
50
49
|
|
|
51
|
-
### ✨ [Demo](<%= projectDemoUrl %>)
|
|
52
|
-
|
|
53
|
-
[<%= projectDemoUrl %>](<%= projectDemoUrl %>)
|
|
54
|
-
|
|
55
|
-
<% } -%>
|
|
56
50
|
<% if (projectPrerequisites && projectPrerequisites.length) { -%>
|
|
57
51
|
|
|
58
|
-
## 依赖要求
|
|
52
|
+
## 📦 依赖要求
|
|
59
53
|
|
|
60
54
|
<% projectPrerequisites.map(({ name, value }) => { -%>
|
|
61
55
|
|
|
@@ -64,7 +58,7 @@
|
|
|
64
58
|
<% } -%>
|
|
65
59
|
<% if (installCommand) { -%>
|
|
66
60
|
|
|
67
|
-
## 安装
|
|
61
|
+
## 🚀 安装
|
|
68
62
|
|
|
69
63
|
```sh
|
|
70
64
|
<%= installCommand %>
|
|
@@ -72,7 +66,7 @@
|
|
|
72
66
|
<% } -%>
|
|
73
67
|
<% if (usage) { -%>
|
|
74
68
|
|
|
75
|
-
## 使用
|
|
69
|
+
## 👨💻 使用
|
|
76
70
|
|
|
77
71
|
```sh
|
|
78
72
|
<%= usage %>
|
|
@@ -80,7 +74,7 @@
|
|
|
80
74
|
<% } -%>
|
|
81
75
|
<% if (devCommand) { -%>
|
|
82
76
|
|
|
83
|
-
## 开发
|
|
77
|
+
## 🛠️ 开发
|
|
84
78
|
|
|
85
79
|
```sh
|
|
86
80
|
<%= devCommand %>
|
|
@@ -88,7 +82,7 @@
|
|
|
88
82
|
<% } -%>
|
|
89
83
|
<% if (buildCommand) { -%>
|
|
90
84
|
|
|
91
|
-
## 编译
|
|
85
|
+
## 🔧 编译
|
|
92
86
|
|
|
93
87
|
```sh
|
|
94
88
|
<%= buildCommand %>
|
|
@@ -96,7 +90,7 @@
|
|
|
96
90
|
<% } -%>
|
|
97
91
|
<% if (testCommand) { -%>
|
|
98
92
|
|
|
99
|
-
## 测试
|
|
93
|
+
## 🧪 测试
|
|
100
94
|
|
|
101
95
|
```sh
|
|
102
96
|
<%= testCommand %>
|
|
@@ -104,7 +98,7 @@
|
|
|
104
98
|
<% } -%>
|
|
105
99
|
<% if (lintCommand) { -%>
|
|
106
100
|
|
|
107
|
-
## Lint
|
|
101
|
+
## 🔍 Lint
|
|
108
102
|
|
|
109
103
|
```sh
|
|
110
104
|
<%= lintCommand %>
|
|
@@ -112,7 +106,7 @@
|
|
|
112
106
|
<% } -%>
|
|
113
107
|
<% if (commitCommand) { -%>
|
|
114
108
|
|
|
115
|
-
## Commit
|
|
109
|
+
## 💾 Commit
|
|
116
110
|
|
|
117
111
|
```sh
|
|
118
112
|
<%= commitCommand %>
|
|
@@ -121,12 +115,13 @@
|
|
|
121
115
|
|
|
122
116
|
<% if (authorName || authorGithubUsername) { -%>
|
|
123
117
|
|
|
124
|
-
## 作者
|
|
118
|
+
## 👤 作者
|
|
125
119
|
|
|
126
120
|
<% if (authorName) { %>
|
|
127
|
-
|
|
121
|
+
**<%= authorName %>**
|
|
128
122
|
<% } %>
|
|
129
123
|
<% if (authorWebsite) { -%>
|
|
124
|
+
|
|
130
125
|
* Website: [<%= authorWebsite %>](<%= authorWebsite %>)
|
|
131
126
|
<% } -%>
|
|
132
127
|
<% if (authorGithubUsername) { -%>
|
|
@@ -135,12 +130,12 @@
|
|
|
135
130
|
<% } %>
|
|
136
131
|
<% if (issuesUrl) { -%>
|
|
137
132
|
|
|
138
|
-
##
|
|
133
|
+
## 🤝 贡献
|
|
139
134
|
|
|
140
135
|
欢迎 贡献、提问或提出新功能!<br />如有问题请查看 [issues page](<%= issuesUrl %>). <br/><%= contributingUrl ? `贡献或提出新功能可以查看[contributing guide](${contributingUrl}).` : '' %>
|
|
141
136
|
<% } -%>
|
|
142
137
|
|
|
143
|
-
##
|
|
138
|
+
## 💰 支持
|
|
144
139
|
|
|
145
140
|
如果觉得这个项目有用的话请给一颗⭐️,非常感谢
|
|
146
141
|
<% if (isEnableAfdian) { -%>
|
|
@@ -150,7 +145,11 @@
|
|
|
150
145
|
</a>
|
|
151
146
|
<% } -%>
|
|
152
147
|
<% if (licenseName && licenseUrl) { -%>
|
|
148
|
+
<% if (isEnableStarHistory) { -%>
|
|
149
|
+
## 🌟 Star History
|
|
153
150
|
|
|
151
|
+
[](https://star-history.com/#<%= authorGithubUsername %>/<%= projectName %>&Date)
|
|
152
|
+
<% } -%>
|
|
154
153
|
## 📝 License
|
|
155
154
|
|
|
156
155
|
<% if (authorName && authorGithubUsername) { -%>
|