From 6700cdff536d501cbd5fc565f29dfc84ea1ba783 Mon Sep 17 00:00:00 2001 From: Sarah Drasner Date: Sat, 5 Feb 2022 12:48:58 -0700 Subject: [PATCH 1/7] vetur -> volar --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f05606..e784b94 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "Vue Snippets" ], "extensionDependencies": [ - "octref.vetur" + "johnsoncodehk.volar" ], "categories": [ "Snippets" From 841a4a5a5a3fc4876920b3ba637f69bf20625412 Mon Sep 17 00:00:00 2001 From: Sarah Drasner Date: Sat, 5 Feb 2022 12:50:28 -0700 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=9A=A9=20update=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ LICENSE | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 993bac7..458d4c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the "vue-vscode-snippets" extension will be documented in this file. +## 3.0.0 + +- Vetur -> Volar, extension dependencies + ## 2.2.1 - remove name of package for composition api now that we're at vue 3 diff --git a/LICENSE b/LICENSE index a5414ee..dd378c9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Sarah Drasner +Copyright (c) 2022 Sarah Drasner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index e784b94..1feb426 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vue VSCode Snippets", "description": "Snippets that will supercharge your Vue workflow", "icon": "images/vue-logo.png", - "version": "2.2.1", + "version": "3.0.0", "publisher": "sdras", "engines": { "vscode": "^1.14.0" From 2b5a4d3717d090cf647e509f6d649ff0273db9e1 Mon Sep 17 00:00:00 2001 From: Sarah Drasner Date: Sat, 5 Feb 2022 15:12:58 -0700 Subject: [PATCH 3/7] remove extension dependencies --- CHANGELOG.md | 4 ++++ package.json | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 458d4c7..5477aae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the "vue-vscode-snippets" extension will be documented in this file. +## 3.1.0 + +- Remove any extension dependencies + ## 3.0.0 - Vetur -> Volar, extension dependencies diff --git a/package.json b/package.json index 1feb426..7c73ac0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vue VSCode Snippets", "description": "Snippets that will supercharge your Vue workflow", "icon": "images/vue-logo.png", - "version": "3.0.0", + "version": "3.1.0", "publisher": "sdras", "engines": { "vscode": "^1.14.0" @@ -23,9 +23,6 @@ "Composition API", "Vue Snippets" ], - "extensionDependencies": [ - "johnsoncodehk.volar" - ], "categories": [ "Snippets" ], From 69c744b2a4898d0009b0c552efa74c491d4e7e3f Mon Sep 17 00:00:00 2001 From: Sarah Drasner Date: Sat, 5 Feb 2022 15:16:07 -0700 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=93=9D=20update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ README.md | 8 -------- package.json | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5477aae..8078471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the "vue-vscode-snippets" extension will be documented in this file. +## 3.1.1 + +- Update README + ## 3.1.0 - Remove any extension dependencies diff --git a/README.md b/README.md index baaad3f..f440a8f 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,6 @@ ext install Vue VSCode Snippets You can enable tab completion (recommended) by opening `Code > Preferences > Settings` (on a Mac) and applying `"editor.tabCompletion": "onlySnippets"` to your personal settings -### Volar Usage - -This extension works out of the box with Vetur, but if you would rather use Volar, either remove `extensionDependencies` or set it to `volar` instead of `vetur`. You can find this file in the extensions package.json (with [versionnumber] replaced with the current installed version, i.e. 2.2.1): - -- Mac: `~/.vscode/extensions/sdras.vue-vscode-snippets-[versionnumber]/package.json` -- Windows: `C:\Users\\.vscode\extensions\sdras.vue-vscode-snippets-[versionnumber]` - ## Snippets ### Vue @@ -176,7 +169,6 @@ This extension works out of the box with Vetur, but if you would rather use Vola | `nfont` | link to include fonts in a nuxt project, in nuxt-config | | `ncss` | link to css assets such as normalize | - ### Nuxt Page | Snippet | Purpose | diff --git a/package.json b/package.json index 7c73ac0..c5d44d3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vue VSCode Snippets", "description": "Snippets that will supercharge your Vue workflow", "icon": "images/vue-logo.png", - "version": "3.1.0", + "version": "3.1.1", "publisher": "sdras", "engines": { "vscode": "^1.14.0" From 01095bc500b28b9c31309bc55ae55d1a720b7099 Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Tue, 19 Nov 2024 15:26:06 -0800 Subject: [PATCH 5/7] feat: add new script setup snippets file --- package.json | 4 ++++ snippets/vue-script-setup.json | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 snippets/vue-script-setup.json diff --git a/package.json b/package.json index c5d44d3..c2b8e57 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,10 @@ "language": "javascript", "path": "./snippets/vue-script.json" }, + { + "language": "javascript", + "path": "./snippets/vue-script-setup.json" + }, { "language": "javascript", "path": "./snippets/vue-script-vuex.json" diff --git a/snippets/vue-script-setup.json b/snippets/vue-script-setup.json new file mode 100644 index 0000000..c0de1d2 --- /dev/null +++ b/snippets/vue-script-setup.json @@ -0,0 +1,40 @@ +{ + "Vue SFC Script Setup (Composition API)": { + "prefix": ["vbase-3-script-setup", "vbase-3-ss"], + "body": [ + "", + "", + "", + "", + "" + ], + "description": "Base for Vue Single File Component Script Setup (Composition API)" + }, + "Vue SFC Script Setup with TypeScript (Composition API)": { + "prefix": ["vbase-3-script-setup-ts", "vbase-3-ss-ts"], + "body": [ + "", + "", + "", + "", + "" + ], + "description": "Base for Vue Single File Component Script Setup with TypeScript (Composition API)" + } +} From 4b947e0fe36a538f6647d458e34b88c4d8c9c612 Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Tue, 19 Nov 2024 15:26:19 -0800 Subject: [PATCH 6/7] docs: update readme with new snippets --- CHANGELOG.md | 5 +++++ README.md | 37 +++++++++++++++++++++---------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8078471..53ef5f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to the "vue-vscode-snippets" extension will be documented in this file. +## 3.2.0 + +- Add base script setup blocks for Vue 3 +- Update README with new snippets + ## 3.1.1 - Update README diff --git a/README.md b/README.md index f440a8f..b71ff08 100644 --- a/README.md +++ b/README.md @@ -32,22 +32,27 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set ### Vue -| Snippet | Purpose | -| ------------------ | ------------------------------------------------------------ | -| `vbase` | Single file component base with SCSS | -| `vbase-3` | Single File component Composition API with SCSS | -| `vbase-3-setup` | Single File component setup Composition API with SCSS | -| `vbase-3-reactive` | Single File component Composition API with Reactive and SCSS | -| `vbase-css` | Single file component base with CSS | -| `vbase-pcss` | Single file component base with PostCSS | -| `vbase-styl` | Single file component base with Stylus | -| `vbase-ts` | Single file component base with Typescript | -| `vbase-ts-class` | Single file component base with Typescript Class Format | -| `vbase-3-ts` | Single File component Composition API with Typescript | -| `vbase-3-ts-setup` | Single File component setup Composition API with Typescript | -| `vbase-ns` | Single file component with no styles | -| `vbase-sass` | Single file component base with SASS | -| `vbase-less` | Single file component base with LESS | +These snippets are meant to provide a base scaffold for your single file components (SFC). + +| Snippet | Purpose | +| ------------------ | ------------------------------------------ | +| `vbase-3-ss` | SFC base with script setup | +| `vbase-3-ss-ts` | SFC base with script setup and TypeScript | +| `vbase` | SFC base with SCSS | +| `vbase-3` | SFC Composition API with SCSS | +| `vbase-3-setup` | SFC setup Composition API with SCSS | +| `vbase-3-setup` | SFC setup Composition API with SCSS | +| `vbase-3-reactive` | SFC Composition API with Reactive and SCSS | +| `vbase-css` | SFC base with CSS | +| `vbase-pcss` | SFC base with PostCSS | +| `vbase-styl` | SFC base with Stylus | +| `vbase-ts` | SFC base with Typescript | +| `vbase-ts-class` | SFC base with Typescript Class Format | +| `vbase-3-ts` | SFC Composition API with Typescript | +| `vbase-3-ts-setup` | SFC setup Composition API with Typescript | +| `vbase-ns` | SFC with no styles | +| `vbase-sass` | SFC base with SASS | +| `vbase-less` | SFC base with LESS | ### Template From ef6181aabe4d54fe024202a6dd8c80c79fe55e5b Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Tue, 19 Nov 2024 15:28:33 -0800 Subject: [PATCH 7/7] config: update version in package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c2b8e57..c9f44b3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vue VSCode Snippets", "description": "Snippets that will supercharge your Vue workflow", "icon": "images/vue-logo.png", - "version": "3.1.1", + "version": "3.2.0", "publisher": "sdras", "engines": { "vscode": "^1.14.0"