From 03dfc4410ebbba0a13db8faf930bb7abb318e05b Mon Sep 17 00:00:00 2001 From: Fabian <82926714+pixel-fabian@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:42:57 +0100 Subject: [PATCH 1/5] feat: Add `withDefaults` snippet for `defineProps` (#58) * feat: :sparkles: ADD withDefaults for defineProps * refactor: :pencil2: RENAME prefix --- README.md | 43 ++++++++++++++------------- snippets/vue/vue-script.code-snippets | 11 +++++++ 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 50b4952..ae5f5db 100644 --- a/README.md +++ b/README.md @@ -63,27 +63,28 @@ These snippets were made to speed up Vue 3 development. With it you can write bo ### Script -| Snippet | Purpose | -| ------------------ | --------------------------- | -| `vref` | Vue `ref` | -| `vreactive` | Vue `reactive` | -| `vcomputed` | Vue `computed` | -| `vwatch` | Watcher | -| `vwatcheffect` | Watch Effect | -| `vonmounted` | onMounted hook | -| `vonbeforemount` | onBeforeMount hook | -| `vonbeforeupdate` | onBeforeUpdate hook | -| `vonupdated` | onUpdated hook | -| `vonerrorcaptured` | onErrorCaptured hook | -| `vonunmounted` | onUnmounted hook | -| `vonbeforeunmount` | onBeforeUnmount hook | -| `vdefineprops` | Define props | -| `vdefineemits` | Define emits | -| `vsingleemit` | Single emit for defineEmits | -| `vdefineslots` | Define slots | -| `vsingleslot` | Single slot for defineSlots | -| `vdefineoptions` | Define Options | -| `vdefinemodel` | Define Model | +| Snippet | Purpose | +| -------------------------- | --------------------------- | +| `vref` | Vue `ref` | +| `vreactive` | Vue `reactive` | +| `vcomputed` | Vue `computed` | +| `vwatch` | Watcher | +| `vwatcheffect` | Watch Effect | +| `vonmounted` | onMounted hook | +| `vonbeforemount` | onBeforeMount hook | +| `vonbeforeupdate` | onBeforeUpdate hook | +| `vonupdated` | onUpdated hook | +| `vonerrorcaptured` | onErrorCaptured hook | +| `vonunmounted` | onUnmounted hook | +| `vonbeforeunmount` | onBeforeUnmount hook | +| `vdefineprops` | Define props | +| `vdefineprops-withdefaults` | Define props with defaults | +| `vdefineemits` | Define emits | +| `vsingleemit` | Single emit for defineEmits | +| `vdefineslots` | Define slots | +| `vsingleslot` | Single slot for defineSlots | +| `vdefineoptions` | Define Options | +| `vdefinemodel` | Define Model | ### CSS diff --git a/snippets/vue/vue-script.code-snippets b/snippets/vue/vue-script.code-snippets index 0018014..f497732 100644 --- a/snippets/vue/vue-script.code-snippets +++ b/snippets/vue/vue-script.code-snippets @@ -107,6 +107,17 @@ ], "description": "Vue defineProps" }, + "Vue Define Props with defaults": { + "prefix": "vdefineprops-withdefaults", + "body": [ + "withDefaults(defineProps<{", + "\t${1:name}: ${2:type}", + "}>(), {", + "\t${1:name}: ${3:default}", + "})" + ], + "description": "Vue withDefaults(defineProps)" + }, "Vue Define Emits": { "prefix": "vdefineemits", "body": [ From c7b3500106424869072c1612f5295016843a90ba Mon Sep 17 00:00:00 2001 From: Fabian <82926714+pixel-fabian@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:43:43 +0100 Subject: [PATCH 2/5] feat: Add `ref` with generic type argument (#59) * feat: :sparkles: ADD ref with generic type argument * feat: Add `withDefaults` snippet for `defineProps` (#58) * feat: :sparkles: ADD withDefaults for defineProps * refactor: :pencil2: RENAME prefix * feat: :sparkles: ADD ref with generic type argument --- README.md | 1 + snippets/vue/vue-script.code-snippets | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index ae5f5db..9b79efb 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ These snippets were made to speed up Vue 3 development. With it you can write bo | Snippet | Purpose | | -------------------------- | --------------------------- | | `vref` | Vue `ref` | +| `vref-typed` | Vue `ref` with generic type argument | | `vreactive` | Vue `reactive` | | `vcomputed` | Vue `computed` | | `vwatch` | Watcher | diff --git a/snippets/vue/vue-script.code-snippets b/snippets/vue/vue-script.code-snippets index f497732..ccf3a06 100644 --- a/snippets/vue/vue-script.code-snippets +++ b/snippets/vue/vue-script.code-snippets @@ -4,6 +4,11 @@ "body": ["const ${1:name} = ref(${2:initialValue})"], "description": "Vue Ref" }, + "Vue Ref typed": { + "prefix": "vref-typed", + "body": ["const ${1:name} = ref<${2:type}>(${3:initialValue})"], + "description": "Vue Ref with generic type argument" + }, "Vue Reactive": { "prefix": "vreactive", "body": ["const ${1:name} = reactive({", "\t${2:count}: ${3:0}", "})"], From d9ec8ac8b1f82372fe7d95dbb1233e4ea5b7547c Mon Sep 17 00:00:00 2001 From: Vasily Kuzin Date: Wed, 20 Dec 2023 22:46:45 +0300 Subject: [PATCH 3/5] docs: Format tables in `README` (#60) Format tables in README --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9b79efb..28a7794 100644 --- a/README.md +++ b/README.md @@ -63,29 +63,29 @@ These snippets were made to speed up Vue 3 development. With it you can write bo ### Script -| Snippet | Purpose | -| -------------------------- | --------------------------- | -| `vref` | Vue `ref` | -| `vref-typed` | Vue `ref` with generic type argument | -| `vreactive` | Vue `reactive` | -| `vcomputed` | Vue `computed` | -| `vwatch` | Watcher | -| `vwatcheffect` | Watch Effect | -| `vonmounted` | onMounted hook | -| `vonbeforemount` | onBeforeMount hook | -| `vonbeforeupdate` | onBeforeUpdate hook | -| `vonupdated` | onUpdated hook | -| `vonerrorcaptured` | onErrorCaptured hook | -| `vonunmounted` | onUnmounted hook | -| `vonbeforeunmount` | onBeforeUnmount hook | -| `vdefineprops` | Define props | -| `vdefineprops-withdefaults` | Define props with defaults | -| `vdefineemits` | Define emits | -| `vsingleemit` | Single emit for defineEmits | -| `vdefineslots` | Define slots | -| `vsingleslot` | Single slot for defineSlots | -| `vdefineoptions` | Define Options | -| `vdefinemodel` | Define Model | +| Snippet | Purpose | +| --------------------------- | ------------------------------------ | +| `vref` | Vue `ref` | +| `vref-typed` | Vue `ref` with generic type argument | +| `vreactive` | Vue `reactive` | +| `vcomputed` | Vue `computed` | +| `vwatch` | Watcher | +| `vwatcheffect` | Watch Effect | +| `vonmounted` | onMounted hook | +| `vonbeforemount` | onBeforeMount hook | +| `vonbeforeupdate` | onBeforeUpdate hook | +| `vonupdated` | onUpdated hook | +| `vonerrorcaptured` | onErrorCaptured hook | +| `vonunmounted` | onUnmounted hook | +| `vonbeforeunmount` | onBeforeUnmount hook | +| `vdefineprops` | Define props | +| `vdefineprops-withdefaults` | Define props with defaults | +| `vdefineemits` | Define emits | +| `vsingleemit` | Single emit for defineEmits | +| `vdefineslots` | Define slots | +| `vsingleslot` | Single slot for defineSlots | +| `vdefineoptions` | Define Options | +| `vdefinemodel` | Define Model | ### CSS From eb9d1c8cd7a97384bf1599e2bfb6133ec4f1d679 Mon Sep 17 00:00:00 2001 From: Vasily Kuzin Date: Wed, 20 Dec 2023 22:52:18 +0300 Subject: [PATCH 4/5] chore: Update contributors (#61) Add Fabian Kurz to contributors --- package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 216e78c..86ee4bc 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,11 @@ "name": "Daniel Kelly", "email": "me@danielkelly.io", "url": "https://github.com/danielkellyio" + }, + { + "name": "Fabian Kurz", + "email": "info@fabian-kurz.de", + "url": "https://github.com/pixel-fabian" } ], "engines": { @@ -145,4 +150,4 @@ } ] } -} \ No newline at end of file +} From 7623fe18fcefbdbdaf027eea22231eb3c2f36bbd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Dec 2023 19:53:07 +0000 Subject: [PATCH 5/5] release: `v0.6.0` --- CHANGELOG.md | 22 ++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c58e54e..78374a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to the "vue3-vscode-snippets" extension will be documented in this file. +## v0.6.0 + +[compare changes](https://github.com/ExEr7um/vue3-vscode-snippets/compare/v0.5.1...v0.6.0) + +### 🚀 Enhancements + +- Add `withDefaults` snippet for `defineProps` ([#58](https://github.com/ExEr7um/vue3-vscode-snippets/pull/58)) +- Add `ref` with generic type argument ([#59](https://github.com/ExEr7um/vue3-vscode-snippets/pull/59)) + +### 📖 Documentation + +- Format tables in `README` ([#60](https://github.com/ExEr7um/vue3-vscode-snippets/pull/60)) + +### 🏡 Chore + +- Update contributors ([#61](https://github.com/ExEr7um/vue3-vscode-snippets/pull/61)) + +### ❤️ Contributors + +- Vasily Kuzin ([@ExEr7um](http://github.com/ExEr7um)) +- Fabian + ## v0.5.1 [compare changes](https://github.com/ExEr7um/vue3-vscode-snippets/compare/v0.5.0...v0.5.1) diff --git a/package.json b/package.json index 86ee4bc..61ad8f4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vue 3 VS Code Snippets", "description": "Vue 3 snippets for VS Code", "icon": "images/vue-logo.png", - "version": "0.5.1", + "version": "0.6.0", "publisher": "exer7um", "repository": { "type": "git", @@ -150,4 +150,4 @@ } ] } -} +} \ No newline at end of file