From 76d5e3a1b04f5d9f62e352e0a642d9add43919b0 Mon Sep 17 00:00:00 2001 From: YRM Date: Tue, 2 Jan 2024 10:59:09 +0800 Subject: [PATCH] feat: support starter vscode template of antfu --- README.md | 10 ++++++++++ package.json | 2 +- resources/vscode.svg | 1 + src/commands/starter.ts | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 resources/vscode.svg diff --git a/README.md b/README.md index 00f946e..7848b1e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,16 @@ Kickstart your project with a Starter Template in VSCode - As a front-end developer, everytime before I create a new project, I have to open a terminal, enter some commands recommended in the front-end framework documentation; sometimes I even forget these commands. This whole process apparently needs more efficiency. - During the development of Flutter, I found that I could quickly create a Flutter project through the Dart extension for VSCode, so I developed this extension in order to do the same when creating some front-end projects. +## Features + +- Create project from starter template +- Select your preferred package manager +- Enable or disable automatic initialization of Git +- Enable or disable automatic installation of dependencies + + ## Usage +

Run Starter Templates: New Project command to create your new project

@@ -32,6 +41,7 @@ Kickstart your project with a Starter Template in VSCode - [Vitesse Lite](https://github.com/antfu/vitesse-lite) - Lightweight version of Vitesse. - [Create Next App](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) - The easiest way to get started with Next.js. - [Starter TS](https://github.com/antfu/starter-ts) - Starter template for TypeScript library. +- [Starter VSCode](https://github.com/antfu/starter-vscode) - Starter template for VS Code Extension. - [Vitesse WebExt](https://github.com/antfu/vitesse-webext) - WebExtension Vite Starter Template. - ... diff --git a/package.json b/package.json index 24b4fe3..4b36efe 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "publisher": "YRM", "name": "starter-templates", "displayName": "Starter Templates", - "version": "0.6.2", + "version": "0.7.0", "description": "Kickstart your project with a Starter Template in VSCode", "license": "MIT", "repository": { diff --git a/resources/vscode.svg b/resources/vscode.svg new file mode 100644 index 0000000..602c5dc --- /dev/null +++ b/resources/vscode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/commands/starter.ts b/src/commands/starter.ts index e21b1d5..2378acf 100644 --- a/src/commands/starter.ts +++ b/src/commands/starter.ts @@ -65,6 +65,9 @@ export class StarterCommands extends BaseCommands { case 'starter-ts': await degit('antfu/starter-ts').clone(`${projectPath}`) break + case 'starter-vscode': + await degit('antfu/starter-vscode').clone(`${projectPath}`) + break case 'vitesse-webext': await degit('antfu/vitesse-webext').clone(`${projectPath}`) break @@ -282,6 +285,19 @@ export class StarterCommands extends BaseCommands { detail: 'Starter template for TypeScript library', template: { id: 'starter-ts', defaultProjectName: 'ts-library-project' }, }, + { + kind: QuickPickItemKind.Separator, + label: 'VSCode Extension', + }, + { + label: 'Starter VSCode(Anthony Fu)', + iconPath: { + dark: Uri.file(this.context.asAbsolutePath('resources/vscode.svg')), + light: Uri.file(this.context.asAbsolutePath('resources/vscode.svg')), + }, + detail: 'Starter template for VS Code Extension', + template: { id: 'starter-vscode', defaultProjectName: 'vscode-extension-project' }, + }, { kind: QuickPickItemKind.Separator, label: 'Web Extension',