Skip to content

Commit f14d671

Browse files
committed
feat: reorder template selection and simplify template path
1 parent 06f6161 commit f14d671

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.changeset/loose-vans-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'create-mcp-kit': patch
3+
---
4+
5+
feat: reorder template selection and simplify template path

packages/create-mcp-kit/src/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ const group = await clack.group(
4343
{ value: 'js', label: pc.blue('JavaScript') },
4444
],
4545
}),
46-
template: () =>
47-
clack.select({
48-
message: 'Project template:',
49-
options: [
50-
{ value: 'standard', label: pc.magenta('Standard (recommended)') },
51-
{ value: 'custom', label: pc.blue('Custom') },
52-
],
53-
}),
5446
transports: () => {
5547
return clack.multiselect({
5648
message: 'Project Transport Type:',
@@ -63,6 +55,14 @@ const group = await clack.group(
6355
],
6456
})
6557
},
58+
template: () =>
59+
clack.select({
60+
message: 'Project template:',
61+
options: [
62+
{ value: 'standard', label: pc.magenta('Standard (recommended)') },
63+
{ value: 'custom', label: pc.blue('Custom') },
64+
],
65+
}),
6666
plugins: ({ results }) => {
6767
if (results.template !== 'custom') {
6868
return Promise.resolve(['github-action', 'vitest', 'inspector', 'style', 'commitlint', 'changelog'])
@@ -93,7 +93,7 @@ const group = await clack.group(
9393
},
9494
)
9595

96-
const templatePath = join(__dirname, '../template', `${group.type}-${group.template}-${group.language}`)
96+
const templatePath = join(__dirname, '../template', `${group.type}-${group.language}`)
9797
const targetPath = resolve(process.cwd(), group.name as string)
9898

9999
if (!(await fileExists(templatePath))) {

0 commit comments

Comments
 (0)