cmyr-template-cli 1.3.0 → 1.5.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/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "cmyr-template-cli",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "草梅友仁自制的项目模板创建器",
5
5
  "author": "CaoMeiYouRen",
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "type": "commonjs",
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "templates"
11
12
  ],
12
13
  "engines": {
13
14
  "node": ">=12"
@@ -39,6 +40,7 @@
39
40
  "@semantic-release/changelog": "^6.0.0",
40
41
  "@semantic-release/git": "^10.0.0",
41
42
  "@types/debug": "^4.1.5",
43
+ "@types/ejs": "^3.1.0",
42
44
  "@types/fs-extra": "^9.0.4",
43
45
  "@types/lodash": "^4.14.165",
44
46
  "@types/node": "^16.9.6",
@@ -52,7 +54,7 @@
52
54
  "cz-conventional-changelog": "^3.3.0",
53
55
  "debug": "^4.3.1",
54
56
  "eslint": "^7.14.0",
55
- "eslint-config-cmyr": "^1.1.13",
57
+ "eslint-config-cmyr": "^1.1.14",
56
58
  "husky": "^7.0.2",
57
59
  "lint-staged": "^12.0.2",
58
60
  "lodash": "^4.17.20",
@@ -66,11 +68,13 @@
66
68
  "validate-commit-msg": "^2.14.0"
67
69
  },
68
70
  "dependencies": {
71
+ "@lint-md/core": "^0.2.1",
69
72
  "axios": "^0.24.0",
70
73
  "colors": "^1.4.0",
71
74
  "commander": "^8.2.0",
72
75
  "dayjs": "^1.9.6",
73
76
  "download-git-repo": "^3.0.2",
77
+ "ejs": "^3.1.6",
74
78
  "fs-extra": "^10.0.0",
75
79
  "minimist": "^1.2.5",
76
80
  "ora": "^5.4.1",
@@ -0,0 +1,135 @@
1
+ <h1 align="center"><%= projectName %> </h1>
2
+ <p>
3
+ <% if (isProjectOnNpm) { -%>
4
+ <a href="https://www.npmjs.com/package/<%= projectName %>" target="_blank">
5
+ <img alt="Version" src="https://img.shields.io/npm/v/<%= projectName %>.svg">
6
+ </a>
7
+ <% } -%>
8
+ <% if (projectVersion && !isProjectOnNpm) { -%>
9
+ <img alt="Version" src="https://img.shields.io/badge/version-<%= projectVersion %>-blue.svg?cacheSeconds=2592000" />
10
+ <% } -%>
11
+ <% if (projectPrerequisites) { -%>
12
+ <% projectPrerequisites.map(({ name, value }) => { -%>
13
+ <img src="https://img.shields.io/badge/<%= name %>-<%= encodeURIComponent(value) %>-blue.svg" />
14
+ <% }) -%>
15
+ <% } -%>
16
+ <% if (projectDocumentationUrl) { -%>
17
+ <a href="<%= projectDocumentationUrl %>" target="_blank">
18
+ <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
19
+ </a>
20
+ <% } -%>
21
+ <% if (isGithubRepos) { -%>
22
+ <a href="<%= repositoryUrl %>/graphs/commit-activity" target="_blank">
23
+ <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
24
+ </a>
25
+ <% } -%>
26
+ <% if (licenseName) { -%>
27
+ <a href="<%= licenseUrl ? licenseUrl : '#' %>" target="_blank">
28
+ <img alt="License: <%= licenseName %>" src="https://img.shields.io/<%= `badge/License-${licenseName}-yellow.svg` %>" />
29
+ </a>
30
+ <% } -%>
31
+
32
+ <% if (projectDescription) { -%>
33
+
34
+ > <%= projectDescription %>
35
+ <% } -%>
36
+ <% if (projectHomepage) { -%>
37
+
38
+ ### 🏠 [主页](<%= projectHomepage %>)
39
+
40
+ [<%= projectHomepage %>](<%= projectHomepage %>)
41
+
42
+ <% } -%>
43
+ <% if (projectDemoUrl) { -%>
44
+
45
+ ### ✨ [Demo](<%= projectDemoUrl %>)
46
+
47
+ [<%= projectDemoUrl %>](<%= projectDemoUrl %>)
48
+
49
+ <% } -%>
50
+ <% if (projectPrerequisites && projectPrerequisites.length) { -%>
51
+
52
+ ## 依赖要求
53
+
54
+ <% projectPrerequisites.map(({ name, value }) => { -%>
55
+ - <%= name %> <%= value %>
56
+ <% }) -%>
57
+ <% } -%>
58
+ <% if (installCommand) { -%>
59
+
60
+ ## 安装
61
+
62
+ ```sh
63
+ <%= installCommand %>
64
+ ```
65
+ <% } -%>
66
+ <% if (usage) { -%>
67
+
68
+ ## 使用
69
+
70
+ ```sh
71
+ <%= usage %>
72
+ ```
73
+ <% } -%>
74
+ <% if (buildCommand) { -%>
75
+
76
+ ## 编译
77
+
78
+ ```sh
79
+ <%= buildCommand %>
80
+ ```
81
+ <% } -%>
82
+ <% if (testCommand) { -%>
83
+
84
+ ## 测试
85
+
86
+ ```sh
87
+ <%= testCommand %>
88
+ ```
89
+ <% } -%>
90
+ <% if (lintCommand) { -%>
91
+
92
+ ## Lint
93
+
94
+ ```sh
95
+ <%= lintCommand %>
96
+ ```
97
+ <% } -%>
98
+
99
+ <% if (authorName || authorGithubUsername) { -%>
100
+
101
+ ## 作者
102
+
103
+ <% if (authorName) { %>
104
+ 👤 **<%= authorName %>**
105
+ <% } %>
106
+ <% if (authorWebsite) { -%>
107
+ * Website: [<%= authorWebsite %>](<%= authorWebsite %>)
108
+ <% } -%>
109
+ <% if (authorGithubUsername) { -%>
110
+ * GitHub: [@<%= authorGithubUsername %>](https://github.com/<%= authorGithubUsername %>)
111
+ <% } -%>
112
+ <% } %>
113
+ <% if (issuesUrl) { -%>
114
+
115
+ ## 🤝贡献
116
+
117
+ 欢迎 Contributions, issues and feature!<br />如有问题请查看 [issues page](<%= issuesUrl %>). <%= contributingUrl ? `您还可以查看[contributing guide](${contributingUrl}).` : '' %>
118
+ <% } -%>
119
+
120
+ ## 支持
121
+
122
+ 如果觉得这个项目有用的话请给一颗⭐️,非常感谢
123
+
124
+ <% if (licenseName && licenseUrl) { -%>
125
+
126
+ ## 📝 License
127
+
128
+ <% if (authorName && authorGithubUsername) { -%>
129
+ Copyright © <%= currentYear %> [<%= authorName %>](https://github.com/<%= authorGithubUsername %>).<br />
130
+ <% } -%>
131
+ This project is [<%= licenseName %>](<%= licenseUrl %>) licensed.
132
+ <% } -%>
133
+
134
+ ***
135
+ _This README was generated with ❤️ by [cmyr-template-cli](https://github.com/CaoMeiYouRen/cmyr-template-cli)_