Open
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -141,6 +141,12 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set
| `vstore-import` | Import vuex store into main.js |
| `vstore2` | Updated Base for Vuex store |

### Pinia

| Snippet | Purpose |
| --------------- | ------------------------------ |
| `v-pinia-store` | Base for Pinia store |

### Vue Router

| Snippet | Purpose |
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
{
"Pinia Store Boilerplate": {
"prefix": "v-pinia-store",
"body": [
"import { defineStore, acceptHMRUpdate } from \"pinia\";",
"",
"export const use$TM_FILENAME_BASE = defineStore(\"$TM_FILENAME_BASE\", {",
" state: () => {",
" return {",
" $0",
" };",
" },",
" getters: {},",
" actions: {},",
"});",
"",
"if (import.meta.hot) {",
" import.meta.hot.accept(acceptHMRUpdate(use$TM_FILENAME_BASE, import.meta.hot));",
"}",
""
],
"description": "Bootstrap the code needed for a Vue.js Pinia store file"
}
}