Skip to content

Commit 86240b9

Browse files
committed
formatting
1 parent 74d861b commit 86240b9

File tree

6 files changed

+191
-184
lines changed

6 files changed

+191
-184
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set
3333
### Vue
3434

3535
| Snippet | Purpose |
36-
| ----------- | ------------------------------------------ |
36+
| ------------ | ------------------------------------------ |
3737
| `vbase` | Single file component base with SCSS |
3838
| `vbase-css` | Single file component base with CSS |
3939
| `vbase-pcss` | Single file component base with PostCSS |
@@ -137,11 +137,11 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set
137137

138138
### Nuxt Page
139139

140-
| Snippet | Purpose |
141-
| ------- | ------------------------------------------------------- |
142-
| `nasyncdata` | Nuxt asyncData |
143-
| `nfetch` | Nuxt Fetch |
144-
| `nhead` | Nuxt Head |
140+
| Snippet | Purpose |
141+
| ------------ | -------------- |
142+
| `nasyncdata` | Nuxt asyncData |
143+
| `nfetch` | Nuxt Fetch |
144+
| `nhead` | Nuxt Head |
145145

146146
### Extra (plaintext)
147147

snippets/nuxt-script.json

+23-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
{
22
"Nuxt Async": {
33
"prefix": "nasyncdata",
4-
"body": ["async asyncData ({ ${1:params} }) {", "\tconst { data } = await fetch(`${2:endpoint}`).then(res => res.json())", "\treturn { ${3:key}:${4:value} }", "},"],
4+
"body": [
5+
"async asyncData ({ ${1:params} }) {",
6+
"\tconst { data } = await fetch(`${2:endpoint}`).then(res => res.json())",
7+
"\treturn { ${3:key}:${4:value} }",
8+
"},"
9+
],
510
"description": "Nuxt asyncData"
611
},
712
"Nuxt Fetch": {
813
"prefix": "nfetch",
9-
"body": ["async fetch ({ store, ${1:params} }) {", "\tlet { data } = await fetch('${2:endpoint}').then(res => res.json())", "\tstore.commit('${3:MUTATION_TYPE}', data)", "},"],
14+
"body": [
15+
"async fetch ({ store, ${1:params} }) {",
16+
"\tlet { data } = await fetch('${2:endpoint}').then(res => res.json())",
17+
"\tstore.commit('${3:MUTATION_TYPE}', data)",
18+
"},"
19+
],
1020
"description": "Nuxt Fetch"
1121
},
1222
"Nuxt Head": {
1323
"prefix": "nhead",
14-
"body": ["head () {", "\treturn {", "\t\ttitle: ${1:'Page Title'},", "\t\tmeta: [", "\t\t\t// hid is used as unique identifier. Do not use `vmid` for it as it will not work","\t\t\t{ hid: 'description', name: 'description', content: ${2:'My custom description'} }", "\t\t]", "\t}", "},"],
24+
"body": [
25+
"head () {",
26+
"\treturn {",
27+
"\t\ttitle: ${1:'Page Title'},",
28+
"\t\tmeta: [",
29+
"\t\t\t// hid is used as unique identifier. Do not use `vmid` for it as it will not work",
30+
"\t\t\t{ hid: 'description', name: 'description', content: ${2:'My custom description'} }",
31+
"\t\t]",
32+
"\t}",
33+
"},"
34+
],
1535
"description": "Nuxt Head"
1636
}
1737
}

snippets/vue-script-router.json

+4-20
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,12 @@
5050
},
5151
"Vue Router afterEach": {
5252
"prefix": "vaftereach",
53-
"body": [
54-
"router.afterEach((to, from) => {",
55-
"\t",
56-
"});"
57-
],
53+
"body": ["router.afterEach((to, from) => {", "\t", "});"],
5854
"description": "Vue Router global guards afterEach"
5955
},
6056
"Vue Router beforeEnter": {
6157
"prefix": "vbeforeenter",
62-
"body": [
63-
"beforeEnter(to, from, next) {",
64-
"\t${1:next();}",
65-
"},"
66-
],
58+
"body": ["beforeEnter(to, from, next) {", "\t${1:next();}", "},"],
6759
"description": "Vue Router per-route guard beforeEnter"
6860
},
6961
"Vue Router beforeRouteEnter": {
@@ -77,20 +69,12 @@
7769
},
7870
"Vue Router beforeRouteUpdate": {
7971
"prefix": "vbeforerouteupdate",
80-
"body": [
81-
"beforeRouteUpdate(to, from, next) {",
82-
"\t${1:next();}",
83-
"},"
84-
],
72+
"body": ["beforeRouteUpdate(to, from, next) {", "\t${1:next();}", "},"],
8573
"description": "Vue Router component guards beforeRouteUpdate"
8674
},
8775
"Vue Router beforeRouteLeave": {
8876
"prefix": "vbeforerouteleave",
89-
"body": [
90-
"beforeRouteLeave(to, from, next) {",
91-
"\t${1:next();}",
92-
"},"
93-
],
77+
"body": ["beforeRouteLeave(to, from, next) {", "\t${1:next();}", "},"],
9478
"description": "Vue Router component guards beforeRouteLeave"
9579
},
9680
"Vue Router Route": {

snippets/vue-script.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@
227227
"Vue Import GSAP": {
228228
"prefix": "vimport-gsap",
229229
"body": ["import { TimelineMax, ${1:Ease} } from 'gsap';"],
230-
"description":
231-
"component methods options that dispatch an action from vuex store."
230+
"description": "component methods options that dispatch an action from vuex store."
232231
},
233232
"Vue Transition Methods with JavaScript Hooks": {
234233
"prefix": "vanimhook-js",

snippets/vue-template.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,16 @@
9191
},
9292
"Vue Named Routing Link": {
9393
"prefix": "vroutename",
94-
"body": ["<router-link :to=\"{name: '${1:name}'}\">${2:LinkTitle}</router-link>"],
94+
"body": [
95+
"<router-link :to=\"{name: '${1:name}'}\">${2:LinkTitle}</router-link>"
96+
],
9597
"description": "Named routing link"
96-
},
98+
},
9799
"Vue Named Routing Link with Params": {
98100
"prefix": "vroutenameparam",
99-
"body": ["<router-link :to=\"{name: '${1:name}', params:{${2:id}: '${3:value}'} }\">${4:LinkTitle}</router-link>"],
101+
"body": [
102+
"<router-link :to=\"{name: '${1:name}', params:{${2:id}: '${3:value}'} }\">${4:LinkTitle}</router-link>"
103+
],
100104
"description": "Named routing link w/ params"
101105
},
102106
"Vue Path Routing Link": {

0 commit comments

Comments
 (0)