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/README.md b/README.md index 50b4952..28a7794 100644 --- a/README.md +++ b/README.md @@ -63,27 +63,29 @@ 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` | +| `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 diff --git a/package.json b/package.json index 216e78c..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", @@ -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": { diff --git a/snippets/vue/vue-script.code-snippets b/snippets/vue/vue-script.code-snippets index 0018014..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}", "})"], @@ -107,6 +112,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": [