cmyr-template-cli 1.4.0 → 1.4.1

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.
Files changed (2) hide show
  1. package/dist/plopfile.js +12 -1
  2. package/package.json +1 -1
package/dist/plopfile.js CHANGED
@@ -81,7 +81,7 @@ async function asyncExec(cmd, options) {
81
81
  }
82
82
  async function init(projectPath, answers) {
83
83
  const loading = ora__default["default"]('正在安装依赖……');
84
- const { name, author, isOpenSource, isRemoveDependabot } = answers;
84
+ const { name, author, description, isOpenSource, isRemoveDependabot } = answers;
85
85
  try {
86
86
  await asyncExec('git --version', {
87
87
  cwd: projectPath,
@@ -107,6 +107,7 @@ async function init(projectPath, answers) {
107
107
  const pkgData = {
108
108
  name,
109
109
  author,
110
+ description,
110
111
  private: !isOpenSource,
111
112
  };
112
113
  const newPkg = Object.assign({}, pkg, pkgData);
@@ -159,6 +160,16 @@ module.exports = function (plop) {
159
160
  default: '',
160
161
  filter: (e) => e.trim(),
161
162
  },
163
+ {
164
+ type: 'input',
165
+ name: 'description',
166
+ message: '请输入项目简介',
167
+ transformer(input) {
168
+ return (input === null || input === void 0 ? void 0 : input.trim()) || '';
169
+ },
170
+ default: '',
171
+ filter: (e) => e.trim(),
172
+ },
162
173
  {
163
174
  type: 'input',
164
175
  name: 'author',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmyr-template-cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "草梅友仁自制的项目模板创建器",
5
5
  "author": "CaoMeiYouRen",
6
6
  "license": "MIT",