|
111 | 111 | "Vue Import Export": { |
112 | 112 | "prefix": "vimport-export", |
113 | 113 | "body": [ |
114 | | - "import ${1:Name} from '@/components/${1:Name}.vue'", |
| 114 | + "import ${1:Name} from '@/components/${1:Name}.vue';", |
115 | 115 | "", |
116 | 116 | "export default {", |
117 | 117 | "\tcomponents: {", |
118 | 118 | "\t\t${1:Name}", |
119 | 119 | "\t},", |
120 | | - "}" |
| 120 | + "};" |
121 | 121 | ], |
122 | 122 | "description": "import a component and include it in export default" |
123 | 123 | }, |
124 | 124 | "Vue MapState": { |
125 | 125 | "prefix": "vmapstate", |
126 | 126 | "body": [ |
127 | | - "import { mapState } from 'vuex'", |
| 127 | + "import { mapState } from 'vuex';", |
128 | 128 | "", |
129 | 129 | "export default {", |
130 | 130 | "\tcomputed: {", |
131 | 131 | "\t\t...mapState([", |
132 | 132 | "\t\t\t${1:'nameOfState'},", |
133 | 133 | "\t\t])", |
134 | 134 | "\t},", |
135 | | - "}" |
| 135 | + "};" |
136 | 136 | ], |
137 | 137 | "description": "map getters inside a vue component" |
138 | 138 | }, |
139 | 139 | "Vue MapGetters": { |
140 | 140 | "prefix": "vmapgetters", |
141 | 141 | "body": [ |
142 | | - "import { mapGetters } from 'vuex'", |
| 142 | + "import { mapGetters } from 'vuex';", |
143 | 143 | "", |
144 | 144 | "export default {", |
145 | 145 | "\tcomputed: {", |
146 | 146 | "\t\t...mapGetters([", |
147 | 147 | "\t\t\t${1:'nameOfGetter'},", |
148 | 148 | "\t\t])", |
149 | 149 | "\t},", |
150 | | - "}" |
| 150 | + "};" |
151 | 151 | ], |
152 | 152 | "description": "mapgetters inside a vue component" |
153 | 153 | }, |
154 | 154 | "Vue MapMutations": { |
155 | 155 | "prefix": "vmapmutations", |
156 | 156 | "body": [ |
157 | | - "import { mapMutations } from 'vuex'", |
| 157 | + "import { mapMutations } from 'vuex';", |
158 | 158 | "", |
159 | 159 | "export default {", |
160 | 160 | "\tmethods: {", |
161 | 161 | "\t\t...mapMutations([", |
162 | 162 | "\t\t\t${1:'nameOfMutation'}, //also supports payload `this.nameOfMutation(amount)` ", |
163 | 163 | "\t\t])", |
164 | 164 | "\t},", |
165 | | - "}" |
| 165 | + "};" |
166 | 166 | ], |
167 | 167 | "description": "mapmutations inside a vue component" |
168 | 168 | }, |
169 | 169 | "Vue MapActions": { |
170 | 170 | "prefix": "vmapactions", |
171 | 171 | "body": [ |
172 | | - "import { mapActions } from 'vuex'", |
| 172 | + "import { mapActions } from 'vuex';", |
173 | 173 | "", |
174 | 174 | "export default {", |
175 | 175 | "\tmethods: {", |
176 | 176 | "\t\t...mapActions([", |
177 | 177 | "\t\t\t${1:'nameOfAction'}, //also supports payload `this.nameOfAction(amount)` ", |
178 | 178 | "\t\t])", |
179 | 179 | "\t},", |
180 | | - "}" |
| 180 | + "};" |
181 | 181 | ], |
182 | 182 | "description": "mapactions inside a vue component" |
183 | 183 | }, |
|
197 | 197 | "body": [ |
198 | 198 | "const ${1:mixinName} = {", |
199 | 199 | "\tmounted() {", |
200 | | - "\t\tconsole.log('hello from mixin!')", |
| 200 | + "\t\tconsole.log('hello from mixin!');", |
201 | 201 | "\t},", |
202 | | - "}" |
| 202 | + "};" |
203 | 203 | ], |
204 | 204 | "description": "vue mixin" |
205 | 205 | }, |
|
221 | 221 | }, |
222 | 222 | "Vue Import Library": { |
223 | 223 | "prefix": "vimport-lib", |
224 | | - "body": ["import { ${1:libName} } from '${1:libName}'"], |
| 224 | + "body": ["import { ${1:libName} } from '${1:libName}';"], |
225 | 225 | "description": "import a library" |
226 | 226 | }, |
227 | 227 | "Vue Import GSAP": { |
228 | 228 | "prefix": "vimport-gsap", |
229 | | - "body": ["import { TimelineMax, ${1:Ease} } from 'gsap'"], |
| 229 | + "body": ["import { TimelineMax, ${1:Ease} } from 'gsap';"], |
230 | 230 | "description": |
231 | 231 | "component methods options that dispatch an action from vuex store." |
232 | 232 | }, |
|
254 | 254 | "prefix": "vcommit", |
255 | 255 | "body": [ |
256 | 256 | "${1:mutationName}() {", |
257 | | - "\tthis.\\$store.commit('${1:mutationName}', ${2:payload})", |
| 257 | + "\tthis.\\$store.commit('${1:mutationName}', ${2:payload});", |
258 | 258 | "}" |
259 | 259 | ], |
260 | 260 | "description": "commit to vuex store in methods for mutation" |
|
263 | 263 | "prefix": "vdispatch", |
264 | 264 | "body": [ |
265 | 265 | "${1:actionName}() {", |
266 | | - "\tthis.\\$store.dispatch('${1:actionName}', ${2:payload})", |
| 266 | + "\tthis.\\$store.dispatch('${1:actionName}', ${2:payload});", |
267 | 267 | "}" |
268 | 268 | ], |
269 | 269 | "description": "dispatch to vuex store in methods for action" |
270 | 270 | }, |
271 | 271 | "Incrementer": { |
272 | 272 | "prefix": "vinc", |
273 | | - "body": ["return ${1:this.num} += ${2:1}"], |
| 273 | + "body": ["return ${1:this.num} += ${2:1};"], |
274 | 274 | "description": "increment" |
275 | 275 | }, |
276 | 276 | "Decrementer": { |
277 | 277 | "prefix": "vdec", |
278 | | - "body": ["return ${1:this.num} -= ${2:1}"], |
| 278 | + "body": ["return ${1:this.num} -= ${2:1};"], |
279 | 279 | "description": "decrement" |
280 | 280 | }, |
281 | 281 | "Unit Test": { |
282 | 282 | "prefix": "vtest", |
283 | 283 | "body": [ |
284 | | - "import Vue from 'vue'", |
285 | | - "import ${1:HelloWorld} from './components/${1:HelloWorld}'", |
| 284 | + "import Vue from 'vue';", |
| 285 | + "import ${1:HelloWorld} from './components/${1:HelloWorld}';", |
286 | 286 | "", |
287 | 287 | "describe('${1:HelloWorld}.vue', () => {", |
288 | 288 | "\tit('${2:should render correct contents}', () => {", |
289 | | - "\t\tconst Constructor = Vue.extend(${1:HelloWorld})", |
290 | | - "\t\tconst vm = new Constructor().$mount()", |
| 289 | + "\t\tconst Constructor = Vue.extend(${1:HelloWorld});", |
| 290 | + "\t\tconst vm = new Constructor().$mount();", |
291 | 291 | "\t\texpect(vm.$el.querySelector('.hello h1').textContent)", |
292 | | - "\t\t\t.to.equal(${3:'Welcome to Your Vue.js App'})", |
293 | | - "\t})", |
294 | | - "})" |
| 292 | + "\t\t\t.to.equal(${3:'Welcome to Your Vue.js App'});", |
| 293 | + "\t});", |
| 294 | + "});" |
295 | 295 | ], |
296 | 296 | "description": "unit test component" |
297 | 297 | }, |
|
0 commit comments