diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..06fee63 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,16 @@ +{ + "name": "vue-vscode-snippets", + "version": "3.1.4", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vue-vscode-snippets", + "version": "3.1.4", + "hasInstallScript": true, + "engines": { + "vscode": "^1.14.0" + } + } + } +} diff --git a/package.json b/package.json index 2066fb6..dfe6b00 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.1.5", "publisher": "sdras", "engines": { "vscode": "^1.14.0" @@ -14,7 +14,7 @@ }, "scripts": { "build": "vsce package -o vue-vscode-snippets-$npm_package_version.vsix", - "install": "yarn build && code --install-extension vue-vscode-snippets-$npm_package_version.vsix" + "install": "npm run build && code --install-extension vue-vscode-snippets-$npm_package_version.vsix" }, "keywords": [ "Vue", @@ -42,6 +42,10 @@ "language": "html", "path": "./snippets/vue-template.json" }, + { + "language": "vue-html", + "path": "./snippets/vue-template.json" + }, { "language": "javascript", "path": "./snippets/vue-script.json" diff --git a/snippets/vue-script.json b/snippets/vue-script.json index 0aa4695..eaf4a42 100644 --- a/snippets/vue-script.json +++ b/snippets/vue-script.json @@ -317,29 +317,32 @@ ], "description": "Vue Composition api - defineProps with Interface" }, - "Vue Composition API - defineEmits with Interface": { + "Vue Composition API - defineEmits": { "prefix": "v3emits", "body": [ - "interface Emits {", + "const emit = defineEmits<{", "\tfoo: [id: number]", "\tbar: [name: string, ...rest: any[]]", - "}", - "", - "const emit = defineEmits()" + "}>()" ], - "description": "Vue Composition api - defineEmits with Interface" + "description": "Vue Composition api - defineEmits" }, - "Vue Composition API - defineSlots with Interface": { + "Vue Composition API - defineSlots": { "prefix": "v3slots", "body": [ - "interface Slots {", + "const slots = defineSlots<{", "\tdefault?: (props: { msg: string }) => any", "\titem?: (props: { id: number }) => any", - "}", - "", - "const slots = defineSlots()" + "}>()" + ], + "description": "Vue Composition api - defineSlots" + }, + "Vue Composition API - defineModel": { + "prefix": "v3model", + "body": [ + "const title = defineModel('title', { required: true })" ], - "description": "Vue Composition api - defineEmits with Interface" + "description": "Vue Composition api - defineModel" }, "Vue Composition API - Store using Provide / Inject": { "prefix": "v3store", diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +