sdd-full 1.4.0 → 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 +16 -9
- 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
|
|
|
@@ -89,14 +89,14 @@ const SDD = {
|
|
|
89
89
|
];
|
|
90
90
|
} else if (environment === 'all') {
|
|
91
91
|
dirsToInstall = [
|
|
92
|
-
{ name: 'Trae
|
|
92
|
+
{ name: 'Trae / Solo', path: path.join(baseDir, '.trae', 'skills') },
|
|
93
93
|
{ name: 'Claude Code', path: path.join(baseDir, '.claude', 'skills') },
|
|
94
94
|
{ name: '通用 sdd-full', path: path.join(baseDir, '.sdd-full', 'skills') }
|
|
95
95
|
];
|
|
96
96
|
} else {
|
|
97
|
-
// 默认:Trae
|
|
97
|
+
// 默认:Trae / Solo
|
|
98
98
|
dirsToInstall = [
|
|
99
|
-
{ name: 'Trae
|
|
99
|
+
{ name: 'Trae / Solo', path: path.join(baseDir, '.trae', 'skills') }
|
|
100
100
|
];
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -168,13 +168,16 @@ 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}`);
|
|
175
178
|
console.log('========================================');
|
|
176
179
|
console.log('\n用法:');
|
|
177
|
-
console.log(' npx sdd-full - 安装到 Trae
|
|
180
|
+
console.log(' npx sdd-full - 安装到 Trae / Solo(默认)');
|
|
178
181
|
console.log(' npx sdd-full cc - 安装到 Claude Code');
|
|
179
182
|
console.log(' npx sdd-full all - 安装到所有环境');
|
|
180
183
|
console.log(' npx sdd-full --help - 显示帮助');
|
|
@@ -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