Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit 9c3f534

Browse files
committed
added pinia.json
1 parent 289173b commit 9c3f534

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
{
7676
"language": "typescript",
7777
"path": "./snippets/nuxt-config.json"
78+
},
79+
{
80+
"language": "typescript",
81+
"path": "./snippets/pinia.json"
7882
}
7983
]
8084
}

snippets/pinia.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"Pinia Store": {
3+
"prefix": "pstore",
4+
"body": [
5+
"import { defineStore } from 'pinia'",
6+
"",
7+
"export const useCounterStore = defineStore('counter', {",
8+
"\tstate: () => {",
9+
"\t\treturn { count: 0 }",
10+
"\t},",
11+
"\tactions: {",
12+
"\t\tincrement() {",
13+
"\t\t\tthis.count++",
14+
"\t\t},",
15+
"\t},",
16+
"})"
17+
],
18+
"description": "Basic Pinia Store"
19+
}
20+
}

0 commit comments

Comments
 (0)