Skip to content

Commit

Permalink
feat: adjust the order of templates
Browse files Browse the repository at this point in the history
  • Loading branch information
yrming committed Dec 29, 2023
1 parent ae15bf0 commit 78f27a0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Kickstart your project with a Starter Template in VSCode

## Support Templates

- [Nuxt3 Minimal Starter](https://github.com/nuxt/starter/tree/v3) - Create a new Nuxt project.
- [Vitesse Nuxt3](https://github.com/antfu/vitesse-nuxt3) - Vitesse for Nuxt 3.
- [Create Vue](https://github.com/vuejs/create-vue) - The recommended way to start a Vite-powered Vue project.
- [Vitesse](https://github.com/antfu/vitesse) - Opinionated starter template.
- [Vitesse Lite](https://github.com/antfu/vitesse-lite) - Lightweight version of Vitesse.
- [Nuxt3 Minimal Starter](https://github.com/nuxt/starter/tree/v3) - Create a new Nuxt project.
- [Vitesse Nuxt3](https://github.com/antfu/vitesse-nuxt3) - Vitesse for Nuxt 3.
- [Starter TS](https://github.com/antfu/starter-ts) - Starter template for TypeScript library.
- [Vitesse WebExt](https://github.com/antfu/vitesse-webext) - WebExtension Vite Starter Template.
- ...
Expand Down
56 changes: 28 additions & 28 deletions src/commands/starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export class StarterCommands extends BaseCommands {

const { templateId, projectName } = triggerData
switch (templateId) {
case 'nuxt3-minimal-starter':
await degit('nuxt/starter/#v3').clone(`${projectPath}`)
break
case 'vitesse-nuxt3':
await degit('antfu/vitesse-nuxt3').clone(`${projectPath}`)
break
case 'create-vue':
chdir(projectPath)
chdir('..')
Expand Down Expand Up @@ -72,12 +78,6 @@ export class StarterCommands extends BaseCommands {
case 'vitesse-lite':
await degit('antfu/vitesse-lite').clone(`${projectPath}`)
break
case 'nuxt3-minimal-starter':
await degit('nuxt/starter/#v3').clone(`${projectPath}`)
break
case 'vitesse-nuxt3':
await degit('antfu/vitesse-nuxt3').clone(`${projectPath}`)
break
case 'vitesse-webext':
await degit('antfu/vitesse-webext').clone(`${projectPath}`)
break
Expand Down Expand Up @@ -129,6 +129,28 @@ export class StarterCommands extends BaseCommands {

private getTemplates(): Array<QuickPickItem & { template?: ProjectTemplate }> {
const templates: Array<QuickPickItem & { template?: ProjectTemplate }> = [
{
kind: QuickPickItemKind.Separator,
label: 'Nuxt',
},
{
label: 'Nuxt3 Minimal Starter(Official)',
iconPath: {
dark: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
light: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
},
detail: 'Create a new Nuxt project',
template: { id: 'nuxt3-minimal-starter', defaultProjectName: 'nuxt-project' },
},
{
label: 'Vitesse Nuxt3(Anthony Fu)',
iconPath: {
dark: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
light: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
},
detail: 'Vitesse for Nuxt 3',
template: { id: 'vitesse-nuxt3', defaultProjectName: 'nuxt-vitesse-project' },
},
{
kind: QuickPickItemKind.Separator,
label: 'Vue',
Expand Down Expand Up @@ -160,28 +182,6 @@ export class StarterCommands extends BaseCommands {
detail: 'Lightweight version of Vitesse',
template: { id: 'vitesse-lite', defaultProjectName: 'vue-vitesse-lite-project' },
},
{
kind: QuickPickItemKind.Separator,
label: 'Nuxt',
},
{
label: 'Nuxt3 Minimal Starter(Official)',
iconPath: {
dark: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
light: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
},
detail: 'Create a new Nuxt project',
template: { id: 'nuxt3-minimal-starter', defaultProjectName: 'nuxt-project' },
},
{
label: 'Vitesse Nuxt3(Anthony Fu)',
iconPath: {
dark: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
light: Uri.file(this.context.asAbsolutePath('resources/nuxt.svg')),
},
detail: 'Vitesse for Nuxt 3',
template: { id: 'vitesse-nuxt3', defaultProjectName: 'nuxt-vitesse-project' },
},
{
kind: QuickPickItemKind.Separator,
label: 'TypeScript Library',
Expand Down

0 comments on commit 78f27a0

Please sign in to comment.