sdd-full 1.3.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/index.js +36 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -8,7 +8,7 @@ const path = require('path');
8
8
 
9
9
  // 技能包的主入口
10
10
  const SDD = {
11
- version: '1.3.0',
11
+ version: '1.4.1',
12
12
  name: 'sdd-full',
13
13
  description: '完整的软件设计开发技能包',
14
14
 
@@ -69,8 +69,8 @@ const SDD = {
69
69
  return null;
70
70
  },
71
71
 
72
- // 安装技能到当前目录(适配 trae-cn 和 claude code)
73
- install: function(targetDir) {
72
+ // 安装技能到指定环境
73
+ install: function(targetDir, environment) {
74
74
  const baseDir = targetDir || process.cwd();
75
75
 
76
76
  console.log('========================================');
@@ -80,12 +80,25 @@ const SDD = {
80
80
 
81
81
  const sourceDir = path.join(__dirname, 'skills');
82
82
 
83
- // 定义要安装的目录位置(支持多种环境)
84
- const dirsToInstall = [
85
- { name: 'Trae-cn / Solo', path: path.join(baseDir, '.trae-cn', 'skills') },
86
- { name: 'Claude Code', path: path.join(baseDir, '.claude', 'skills') },
87
- { name: '通用 sdd-full', path: path.join(baseDir, '.sdd-full', 'skills') }
88
- ];
83
+ // 根据环境选择安装目录
84
+ let dirsToInstall;
85
+
86
+ if (environment === 'cc') {
87
+ dirsToInstall = [
88
+ { name: 'Claude Code', path: path.join(baseDir, '.claude', 'skills') }
89
+ ];
90
+ } else if (environment === 'all') {
91
+ dirsToInstall = [
92
+ { name: 'Trae / Solo', path: path.join(baseDir, '.trae', 'skills') },
93
+ { name: 'Claude Code', path: path.join(baseDir, '.claude', 'skills') },
94
+ { name: '通用 sdd-full', path: path.join(baseDir, '.sdd-full', 'skills') }
95
+ ];
96
+ } else {
97
+ // 默认:Trae / Solo
98
+ dirsToInstall = [
99
+ { name: 'Trae / Solo', path: path.join(baseDir, '.trae', 'skills') }
100
+ ];
101
+ }
89
102
 
90
103
  let totalCount = 0;
91
104
 
@@ -161,9 +174,9 @@ if (require.main === module) {
161
174
  console.log(` 版本: ${SDD.version}`);
162
175
  console.log('========================================');
163
176
  console.log('\n用法:');
164
- console.log(' npx sdd-full - 安装技能(默认)');
165
- console.log(' npx sdd-full install - 安装技能');
166
- console.log(' npx sdd-full i - 安装技能(简写)');
177
+ console.log(' npx sdd-full - 安装到 Trae / Solo(默认)');
178
+ console.log(' npx sdd-full cc - 安装到 Claude Code');
179
+ console.log(' npx sdd-full all - 安装到所有环境');
167
180
  console.log(' npx sdd-full --help - 显示帮助');
168
181
  console.log(' npx sdd-full --dir ./myproj - 安装到指定目录');
169
182
 
@@ -180,6 +193,16 @@ if (require.main === module) {
180
193
  if (targetIndex !== -1 && args[targetIndex + 1]) {
181
194
  targetDir = args[targetIndex + 1];
182
195
  }
183
- SDD.install(targetDir);
196
+
197
+ let environment;
198
+ if (args.includes('cc')) {
199
+ environment = 'cc';
200
+ } else if (args.includes('all')) {
201
+ environment = 'all';
202
+ } else {
203
+ environment = 'trae'; // 默认
204
+ }
205
+
206
+ SDD.install(targetDir, environment);
184
207
  }
185
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdd-full",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "description": "SDD Full - 完整的软件设计开发技能包",
5
5
  "main": "index.js",
6
6
  "bin": {