|
| 1 | +{ |
| 2 | + "import": { |
| 3 | + "scope": "javascript,typescript", |
| 4 | + "prefix": "im", |
| 5 | + "body": [ |
| 6 | + "import { $1 } from '$2';" |
| 7 | + ], |
| 8 | + "description": "Import a module" |
| 9 | + }, |
| 10 | + "export-all": { |
| 11 | + "scope": "javascript,typescript", |
| 12 | + "prefix": "ex", |
| 13 | + "body": [ |
| 14 | + "export * from '$2';" |
| 15 | + ], |
| 16 | + "description": "Export a module" |
| 17 | + }, |
| 18 | + "vue-script-setup": { |
| 19 | + "scope": "vue", |
| 20 | + "prefix": "<sc", |
| 21 | + "body": [ |
| 22 | + "<script setup lang=\"ts\">", |
| 23 | + "const props = defineProps<{", |
| 24 | + " modelValue?: boolean,", |
| 25 | + "}>()", |
| 26 | + "$1", |
| 27 | + "</script>", |
| 28 | + "", |
| 29 | + "<template>", |
| 30 | + " <div>", |
| 31 | + " <slot/>", |
| 32 | + " </div>", |
| 33 | + "</template>", |
| 34 | + ] |
| 35 | + }, |
| 36 | + "vue-template-ref": { |
| 37 | + "scope": "javascript,typescript,vue", |
| 38 | + "prefix": "tref", |
| 39 | + "body": [ |
| 40 | + "const ${1:el} = shallowRef<HTMLDivElement>()", |
| 41 | + ] |
| 42 | + }, |
| 43 | + "vue-computed": { |
| 44 | + "scope": "javascript,typescript,vue", |
| 45 | + "prefix": "com", |
| 46 | + "body": [ |
| 47 | + "computed(() => { $1 })" |
| 48 | + ] |
| 49 | + }, |
| 50 | + "vue-watch-effect": { |
| 51 | + "scope": "javascript,typescript,vue", |
| 52 | + "prefix": "watchE", |
| 53 | + "body": [ |
| 54 | + "watchEffect(() => {", |
| 55 | + " $1", |
| 56 | + "})" |
| 57 | + ] |
| 58 | + }, |
| 59 | + "if-vitest": { |
| 60 | + "scope": "javascript,typescript", |
| 61 | + "prefix": "ifv", |
| 62 | + "body": [ |
| 63 | + "if (import.meta.vitest) {", |
| 64 | + " const { describe, it, expect } = import.meta.vitest", |
| 65 | + " ${1}", |
| 66 | + "}" |
| 67 | + ] |
| 68 | + }, |
| 69 | + "markdown-api-table": { |
| 70 | + "scope": "markdown", |
| 71 | + "prefix": "table", |
| 72 | + "body": [ |
| 73 | + "<table>", |
| 74 | + "<tr>", |
| 75 | + "<td width=\"400px\" valign=\"top\">", |
| 76 | + "", |
| 77 | + "### API", |
| 78 | + "", |
| 79 | + "Description", |
| 80 | + "", |
| 81 | + "</td>", |
| 82 | + "<td width=\"600px\"><br>", |
| 83 | + "", |
| 84 | + "```ts", |
| 85 | + "// code block", |
| 86 | + "```", |
| 87 | + "", |
| 88 | + "</td>", |
| 89 | + "</tr>", |
| 90 | + "</table>", |
| 91 | + ], |
| 92 | + } |
| 93 | +} |
0 commit comments