cmyr-template-cli 1.19.1 → 1.19.3
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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var lodash = require('lodash');
|
|
5
4
|
var fs = require('fs-extra');
|
|
6
5
|
var path = require('path');
|
|
7
6
|
var ora = require('ora');
|
|
@@ -10,6 +9,7 @@ var axios = require('axios');
|
|
|
10
9
|
var child_process = require('child_process');
|
|
11
10
|
var colors = require('colors');
|
|
12
11
|
var ejs = require('ejs');
|
|
12
|
+
var lodash = require('lodash');
|
|
13
13
|
var core = require('@lint-md/core');
|
|
14
14
|
var JSON5 = require('json5');
|
|
15
15
|
|
|
@@ -1070,6 +1070,9 @@ async function removeFiles(projectPath, files) {
|
|
|
1070
1070
|
throw error;
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
|
+
function kebabCase(str) {
|
|
1074
|
+
return str.replace(/([a-z])([A-Z])/g, '$1-$2').replace(/_+/g, '-').replace(/\s+/g, '-').toLowerCase();
|
|
1075
|
+
}
|
|
1073
1076
|
|
|
1074
1077
|
module.exports = function (plop) {
|
|
1075
1078
|
plop.setActionType('initProject', initProject);
|
|
@@ -1085,7 +1088,7 @@ module.exports = function (plop) {
|
|
|
1085
1088
|
return input.trim().length !== 0;
|
|
1086
1089
|
},
|
|
1087
1090
|
default: '',
|
|
1088
|
-
filter: (e) =>
|
|
1091
|
+
filter: (e) => kebabCase(e.trim()),
|
|
1089
1092
|
},
|
|
1090
1093
|
{
|
|
1091
1094
|
type: 'input',
|
|
@@ -1282,8 +1285,8 @@ module.exports = function (plop) {
|
|
|
1282
1285
|
},
|
|
1283
1286
|
{
|
|
1284
1287
|
type: 'confirm',
|
|
1285
|
-
name: '
|
|
1286
|
-
message: '
|
|
1288
|
+
name: 'isEnableSupport',
|
|
1289
|
+
message: '是否启用赞助支持 ?',
|
|
1287
1290
|
default: false,
|
|
1288
1291
|
when(answers) {
|
|
1289
1292
|
return answers.isOpenSource;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmyr-template-cli",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.3",
|
|
4
4
|
"description": "草梅友仁自制的项目模板创建器",
|
|
5
5
|
"author": "CaoMeiYouRen",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"@types/lodash": "^4.14.165",
|
|
47
47
|
"@types/node": "^20.0.0",
|
|
48
48
|
"@types/promise.any": "^2.0.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "
|
|
50
|
-
"@typescript-eslint/parser": "
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "5.59.11",
|
|
50
|
+
"@typescript-eslint/parser": "5.59.11",
|
|
51
51
|
"commitizen": "^4.2.2",
|
|
52
52
|
"conventional-changelog-cli": "^2.1.1",
|
|
53
53
|
"conventional-changelog-cmyr-config": "^2.0.2",
|
|
54
54
|
"cross-env": "^7.0.2",
|
|
55
55
|
"cz-conventional-changelog-cmyr": "^1.0.0",
|
|
56
56
|
"debug": "^4.3.1",
|
|
57
|
-
"eslint": "
|
|
57
|
+
"eslint": "8.42.0",
|
|
58
58
|
"eslint-config-cmyr": "^1.1.27",
|
|
59
59
|
"husky": "^8.0.1",
|
|
60
60
|
"lint-staged": "^13.0.0",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
name: Test
|
|
2
|
-
on:
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
3
6
|
jobs:
|
|
4
7
|
test:
|
|
5
8
|
name: Test
|
|
@@ -19,6 +22,8 @@ jobs:
|
|
|
19
22
|
with:
|
|
20
23
|
path: |
|
|
21
24
|
~/.npm
|
|
25
|
+
~/.yarn
|
|
26
|
+
~/.cache/pnpm
|
|
22
27
|
~/cache
|
|
23
28
|
!~/cache/exclude
|
|
24
29
|
**/node_modules
|
package/templates/README.md
CHANGED
|
@@ -138,14 +138,18 @@
|
|
|
138
138
|
## 💰 支持
|
|
139
139
|
|
|
140
140
|
如果觉得这个项目有用的话请给一颗⭐️,非常感谢
|
|
141
|
-
<% if (
|
|
141
|
+
<% if (isEnableSupport) { -%>
|
|
142
142
|
|
|
143
143
|
<a href="https://afdian.net/@<%= authorName %>">
|
|
144
|
-
<img src="https://cdn.jsdelivr.net/gh/CaoMeiYouRen/image-hosting-01@master/images/202112181214695.png">
|
|
144
|
+
<img src="https://cdn.jsdelivr.net/gh/CaoMeiYouRen/image-hosting-01@master/images/202112181214695.png" width="312px" >
|
|
145
145
|
</a>
|
|
146
|
-
<% } -%>
|
|
147
146
|
|
|
147
|
+
<a href="https://patreon.com/<%= authorName %>">
|
|
148
|
+
<img src="https://cdn.jsdelivr.net/gh/CaoMeiYouRen/image-hosting-01@master/images/202306142054108.svg" width="312px" height="78px" />
|
|
149
|
+
</a>
|
|
150
|
+
<% } -%>
|
|
148
151
|
<% if (isEnableStarHistory) { -%>
|
|
152
|
+
|
|
149
153
|
## 🌟 Star History
|
|
150
154
|
|
|
151
155
|
[](https://star-history.com/#<%= authorGithubUsername %>/<%= projectName %>&Date)
|