sdd-full 1.4.1 → 1.4.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/index.js +12 -5
- package/package.json +2 -4
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const path = require('path');
|
|
|
8
8
|
|
|
9
9
|
// 技能包的主入口
|
|
10
10
|
const SDD = {
|
|
11
|
-
version: '1.4.
|
|
11
|
+
version: '1.4.3',
|
|
12
12
|
name: 'sdd-full',
|
|
13
13
|
description: '完整的软件设计开发技能包',
|
|
14
14
|
|
|
@@ -168,7 +168,10 @@ module.exports = SDD;
|
|
|
168
168
|
if (require.main === module) {
|
|
169
169
|
const args = process.argv.slice(2);
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
// 检查是否需要显示帮助
|
|
172
|
+
const showHelp = args.some(arg => arg === '--help' || arg === '-h');
|
|
173
|
+
|
|
174
|
+
if (showHelp) {
|
|
172
175
|
console.log('========================================');
|
|
173
176
|
console.log(` ${SDD.name} - ${SDD.description}`);
|
|
174
177
|
console.log(` 版本: ${SDD.version}`);
|
|
@@ -188,16 +191,20 @@ if (require.main === module) {
|
|
|
188
191
|
|
|
189
192
|
console.log(`\n总计 ${skills.length} 个技能\n`);
|
|
190
193
|
} else {
|
|
194
|
+
// 否则,直接安装
|
|
191
195
|
let targetDir;
|
|
192
|
-
const targetIndex = args.indexOf('--dir')
|
|
196
|
+
const targetIndex = args.indexOf('--dir');
|
|
197
|
+
const targetIndexShort = args.indexOf('-d');
|
|
193
198
|
if (targetIndex !== -1 && args[targetIndex + 1]) {
|
|
194
199
|
targetDir = args[targetIndex + 1];
|
|
200
|
+
} else if (targetIndexShort !== -1 && args[targetIndexShort + 1]) {
|
|
201
|
+
targetDir = args[targetIndexShort + 1];
|
|
195
202
|
}
|
|
196
203
|
|
|
197
204
|
let environment;
|
|
198
|
-
if (args.
|
|
205
|
+
if (args.indexOf('cc') !== -1) {
|
|
199
206
|
environment = 'cc';
|
|
200
|
-
} else if (args.
|
|
207
|
+
} else if (args.indexOf('all') !== -1) {
|
|
201
208
|
environment = 'all';
|
|
202
209
|
} else {
|
|
203
210
|
environment = 'trae'; // 默认
|
package/package.json
CHANGED