diff --git a/README.md b/README.md index 6761308..8dc6e76 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
-Create a project quickly and easily in VSCode +Kickstart your project with a Starter Template in VSCode
## Why @@ -17,12 +17,12 @@ Create a project quickly and easily in VSCode - [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, module, layer or start from a theme with our collection of starters. - [Vitesse Nuxt3](https://github.com/antfu/vitesse-nuxt3) - Vitesse for Nuxt 3. - [Vitesse WebExt](https://github.com/antfu/vitesse-webext) - WebExtension Vite Starter Template. - [Starter TS](https://github.com/antfu/starter-ts) - Starter template for TypeScript library. - ... - ## License MIT License © 2023 [YRM](https://github.com/yrming) diff --git a/package-lock.json b/package-lock.json index 226272c..8f9b032 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "starter-templates", - "version": "0.1.6", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "starter-templates", - "version": "0.1.6", + "version": "0.2.0", "license": "MIT", "dependencies": { "degit": "^2.8.4", diff --git a/package.json b/package.json index 9bff84c..a5cc477 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "publisher": "YRM", "name": "starter-templates", "displayName": "Starter Templates", - "version": "0.1.6", - "description": "Create a project quickly and easily in VSCode", + "version": "0.2.0", + "description": "Kickstart your project with a Starter Template in VSCode", "license": "MIT", "repository": { "type": "git", @@ -89,6 +89,35 @@ "scope": "window" } } + }, + { + "title": "Nuxt3 Minimal Starter(Official)", + "order": 2, + "properties": { + "starterTemplates.nuxt3MinimalStarter.needsGitInit": { + "type": "boolean", + "default": true, + "markdownDescription": "Initialize git repository", + "scope": "window" + }, + "starterTemplates.nuxt3MinimalStarter.needsInstall": { + "type": "boolean", + "default": true, + "markdownDescription": "Install project dependencies", + "scope": "window" + }, + "starterTemplates.nuxt3MinimalStarter.packageManager": { + "enum": [ + "pnpm", + "npm", + "yarn", + "bun" + ], + "default": "pnpm", + "description": "Package manager choice", + "scope": "window" + } + } } ] }, diff --git a/src/commands/starter.ts b/src/commands/starter.ts index 5a09cf6..e9fbf95 100644 --- a/src/commands/starter.ts +++ b/src/commands/starter.ts @@ -70,6 +70,10 @@ export class StarterCommands extends BaseCommands { break 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}`) @@ -127,11 +131,11 @@ export class StarterCommands extends BaseCommands { kind: QuickPickItemKind.Separator, label: 'Nuxt', }, - // { - // label: "Nuxi(Official)", - // detail: "⚡️ Nuxt Generation CLI Experience", - // template: { id: "nuxi", defaultProjectName: 'nuxt-project' }, - // }, + { + label: 'Nuxt3 Minimal Starter(Official)', + detail: 'Create a new Nuxt project, module, layer or start from a theme with our collection of starters.', + template: { id: 'nuxt3-minimal-starter', defaultProjectName: 'nuxt-project' }, + }, { label: 'Vitesse Nuxt3(Anthony Fu)', detail: 'Vitesse for Nuxt 3 🏔💚⚡️', @@ -203,7 +207,7 @@ export class StarterCommands extends BaseCommands { title: 'Project Name', validation: s => this.validateProjectName(s, folderPath), value: defaultName, - enableSetting: template.id === 'create-vue', + enableSetting: template.id === 'create-vue' || template.id === 'nuxt3-minimal-starter', }, ) @@ -304,9 +308,35 @@ export class StarterCommands extends BaseCommands { }, ) } - return createVueSettings - + case 'nuxt3-minimal-starter': + return [ + { + currentValue: config.nuxt3MinimalStarterNeedsGitInit ? 'Yes' : 'No', + description: config.nuxt3MinimalStarterNeedsGitInit ? 'Yes' : 'No', + detail: '', + label: 'Initialize git repository?', + setValue: (newValue: boolean) => config.setNuxt3MinimalStarterNeedsGitInit(newValue), + settingKind: 'BOOL', + }, + { + currentValue: config.nuxt3MinimalStarterNeedsInstall ? 'Yes' : 'No', + description: config.nuxt3MinimalStarterNeedsInstall ? 'Yes' : 'No', + detail: '', + label: 'Install project dependencies?', + setValue: (newValue: boolean) => config.setNuxt3MinimalStarterNeedsInstall(newValue), + settingKind: 'BOOL', + }, + { + currentValue: config.nuxt3MinimalStarterPackageManager || 'pnpm', + description: config.nuxt3MinimalStarterPackageManager || 'pnpm', + detail: '', + enumValues: ['pnpm', 'npm', 'yarn', 'bun'], + label: 'Package manager choice?', + setValue: (newValue: 'pnpm' | 'npm' | 'yarn' | 'bun') => config.setNuxt3MinimalStarterPackageManager(newValue), + settingKind: 'ENUM', + }, + ] default: return [] } diff --git a/src/config.ts b/src/config.ts index 4694738..4f10aa3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -38,6 +38,7 @@ class Config { get projectSearchDepth(): number { return this.getConfig