From 504347ff7968898179ffb8203c839ca71ed53f60 Mon Sep 17 00:00:00 2001 From: Vasily Kuzin Date: Tue, 6 Jun 2023 21:18:12 +0300 Subject: [PATCH 1/2] Fix vitest in readme --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 94d8b77..617282c 100644 --- a/README.md +++ b/README.md @@ -171,12 +171,22 @@ These snippets were made to speed up Vue 3 development. With it you can write bo | `vitest-todo` | Vitest Test - Todo | | `visnapshot` | Vitest Match Snapshot | | `visnapshot-inline` | Vitest Match Snapshot - Inline | -| `vimount` | Vue Test Utils `mount` | -| `vicomponent` | Vue Test Utils Component | -| `vimount-suspended` | nuxt-vitest `mountSuspended` | -| `vimocknuxtimport` | nuxt-vitest `mockNuxtImport` | -| `vimockcomponent` | nuxt-vitest `mockComponent` | -| `viregisterendpoint` | nuxt-vitest `registerEndpoint` | + +### Vitest Vue + +| Snippet | Purpose | +| ------------- | ------------------------ | +| `vimount` | Vue Test Utils `mount` | +| `vicomponent` | Vue Test Utils Component | + +### Vitest Nuxt + +| Snippet | Purpose | +| -------------------- | ------------------------------ | +| `vimount-suspended` | nuxt-vitest `mountSuspended` | +| `vimocknuxtimport` | nuxt-vitest `mockNuxtImport` | +| `vimockcomponent` | nuxt-vitest `mockComponent` | +| `viregisterendpoint` | nuxt-vitest `registerEndpoint` | ## Contributing From ce9881b00f471d240a8b964a0db389aacefd2e4c Mon Sep 17 00:00:00 2001 From: Vasily Kuzin Date: Tue, 6 Jun 2023 21:18:25 +0300 Subject: [PATCH 2/2] Vue 3.3 snippets #41 --- README.md | 4 ++++ snippets/vue/vue-script.code-snippets | 34 ++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 617282c..ff2e2f0 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,10 @@ These snippets were made to speed up Vue 3 development. With it you can write bo | `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 | ### CSS diff --git a/snippets/vue/vue-script.code-snippets b/snippets/vue/vue-script.code-snippets index f9ef317..f9e6325 100644 --- a/snippets/vue/vue-script.code-snippets +++ b/snippets/vue/vue-script.code-snippets @@ -123,4 +123,36 @@ ], "description": "Vue single emit for defineEmits" }, -} \ No newline at end of file + "Vue Define Slots": { + "prefix": "vdefineslots", + "body": [ + "defineSlots<{", + "\tdefault: (props: { ${0} }) => any", + "}>()" + ], + "description": "Vue defineSlots" + }, + "Vue Single Slot": { + "prefix": "vsingleslot", + "body": [ + "\t${1:slotName}: (props: { ${0} }) => any", + ], + "description": "Vue single slot for defineSlots" + }, + "Vue Define Options": { + "prefix": "vdefineoptions", + "body": [ + "defineOptions({", + "\t${0}", + "})" + ], + "description": "Vue defineOptions" + }, + "Vue Define Model": { + "prefix": "vdefinemodel", + "body": [ + "const modelValue = defineModel()", + ], + "description": "Vue defineModel" + }, +}