Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1ced9c

Browse files
author
Eduardo Alves
committed
feature: add core directives
1 parent d61f42e commit b1ced9c

11 files changed

+203
-53
lines changed

‎CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.5.0
2+
* Add core directives snippets
3+
* Refactor global api snippets
4+
* Change prefixes from `vue*` to `v*`
5+
16
## 0.4.2
27
* Update package description
38

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "Vue.js 1.0+ ES6 snippets for Atom",
44
"keywords": [
55
"vue",
6+
"vue.js",
67
"components",
78
"snippets"
89
],

‎snippets/directives.cson

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
'.text.html.vue .meta.tag.any.html':
2+
'v-text':
3+
'prefix': 'vtext',
4+
'body': """
5+
v-text="0ドル"
6+
"""
7+
'v-html':
8+
'prefix': 'vhtml',
9+
'body': """
10+
v-html="0ドル"
11+
"""
12+
'v-if':
13+
'prefix': 'vif',
14+
'body': """
15+
v-if="0ドル"
16+
"""
17+
'v-show':
18+
'prefix': 'vshow',
19+
'body': """
20+
v-show="0ドル"
21+
"""
22+
'v-else':
23+
'prefix': 'velse',
24+
'body': """
25+
v-else="0ドル"
26+
"""
27+
'v-for':
28+
'prefix': 'vfor',
29+
'body': """
30+
v-for="${1:item} in ${2:items}"
31+
"""
32+
'v-on':
33+
'prefix': 'von',
34+
'body': """
35+
v-on:1ドル="2ドル"
36+
"""
37+
'v-on:click':
38+
'prefix': 'vclick',
39+
'body': """
40+
@click1ドル="2ドル"
41+
"""
42+
'v-on:submit':
43+
'prefix': 'vsubmit',
44+
'body': """
45+
@submit1ドル="2ドル"
46+
"""
47+
'v-bind':
48+
'prefix': 'vbind',
49+
'body': """
50+
:1ドル="2ドル"
51+
"""
52+
'v-model':
53+
'prefix': 'vmodel',
54+
'body': """
55+
v-model="1ドル"
56+
"""
57+
'v-ref':
58+
'prefix': 'vref',
59+
'body': """
60+
v-ref:1ドル
61+
"""
62+
'v-el':
63+
'prefix': 'vel',
64+
'body': """
65+
v-el:1ドル
66+
"""
67+
'v-pre':
68+
'prefix': 'vpre',
69+
'body': """
70+
v-pre
71+
"""
72+
'v-cloak':
73+
'prefix': 'vcloak',
74+
'body': """
75+
v-cloak
76+
"""

‎snippets/vue-component.cson

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Vue components
21
'.text.html.vue':
32
'Vue Template Tag':
4-
'prefix': 'vuetemplate',
3+
'prefix': 'vtemplate',
54
'body': """
65
<template${1: lang="2ドル"}>0ドル</template>
76
"""
87
'Vue Script Tag':
9-
'prefix': 'vuescript',
8+
'prefix': 'vscript',
109
'body': """
1110
<script${1: lang="2ドル"}>
1211
\texport default {
@@ -48,7 +47,7 @@
4847
</script>
4948
"""
5049
'Vue Style Tag':
51-
'prefix': 'vuestyle',
50+
'prefix': 'vstyle',
5251
'body': """
5352
<style${1: lang="2ドル"}${3: scoped}>0ドル</style>
5453
"""

‎snippets/vue-core-directives.cson

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
'.text.html.vue .meta.tag.any.html':
2+
'v-text':
3+
'prefix': 'vtext',
4+
'body': """
5+
v-text="0ドル"
6+
"""
7+
'v-html':
8+
'prefix': 'vhtml',
9+
'body': """
10+
v-html="0ドル"
11+
"""
12+
'v-if':
13+
'prefix': 'vif',
14+
'body': """
15+
v-if="0ドル"
16+
"""
17+
'v-show':
18+
'prefix': 'vshow',
19+
'body': """
20+
v-show="0ドル"
21+
"""
22+
'v-else':
23+
'prefix': 'velse',
24+
'body': """
25+
v-else="0ドル"
26+
"""
27+
'v-for':
28+
'prefix': 'vfor',
29+
'body': """
30+
v-for="${1:item} in ${2:items}"
31+
"""
32+
'v-on':
33+
'prefix': 'von',
34+
'body': """
35+
v-on:1ドル="2ドル"
36+
"""
37+
'v-on:click':
38+
'prefix': 'vclick',
39+
'body': """
40+
@click1ドル="2ドル"
41+
"""
42+
'v-on:submit':
43+
'prefix': 'vsubmit',
44+
'body': """
45+
@submit1ドル="2ドル"
46+
"""
47+
'v-bind':
48+
'prefix': 'vbind',
49+
'body': """
50+
:1ドル="2ドル"
51+
"""
52+
'v-model':
53+
'prefix': 'vmodel',
54+
'body': """
55+
v-model="1ドル"
56+
"""
57+
'v-ref':
58+
'prefix': 'vref',
59+
'body': """
60+
v-ref:1ドル
61+
"""
62+
'v-el':
63+
'prefix': 'vel',
64+
'body': """
65+
v-el:1ドル
66+
"""
67+
'v-pre':
68+
'prefix': 'vpre',
69+
'body': """
70+
v-pre
71+
"""
72+
'v-cloak':
73+
'prefix': 'vcloak',
74+
'body': """
75+
v-cloak
76+
"""

‎snippets/vue-directive.cson

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎snippets/vue-directives.cson

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'.source.js':
2+
'Vue Directive':
3+
'prefix': 'vdirective',
4+
'body': """
5+
Vue.directive('1ドル', {
6+
\tbind () {},
7+
\tupdate (value) {},
8+
\tunbind () {}${2:// },
9+
\t${3:// }params: [4ドル],
10+
\t${5:// }paramWatchers: {6ドル},
11+
\t${7:// }deep: ${8:false},
12+
\t${9:// }twoWay: ${10:false},
13+
\t${11:// }acceptStatement: ${12:false},
14+
\t${13:// }priority: ${14:1000}
15+
})
16+
"""
17+
'Vue Element Directive':
18+
'prefix': 'veldirective',
19+
'body': """
20+
Vue.elementDirective('1ドル', {
21+
\tbind () {},
22+
\tupdate (value) {},
23+
\tunbind () {}${2:// },
24+
\t${3:// }params: [4ドル],
25+
\t${5:// }paramWatchers: {6ドル},
26+
\t${7:// }deep: ${8:false},
27+
\t${9:// }twoWay: ${10:false},
28+
\t${11:// }acceptStatement: ${12:false},
29+
\t${13:// }priority: ${14:1000}
30+
})
31+
"""

‎snippets/vue-element-directive.cson

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎snippets/vue-filter.cson

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎snippets/vue-two-way-filter.cson renamed to ‎snippets/vue-filters.cson

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
# Javascript files
2-
'.source.js, .source.ts':
1+
'.source.js':
2+
'Vue Filter':
3+
'prefix': 'vfilter',
4+
'body': """
5+
Vue.filter('1ドル', function(val2ドル) {
6+
\t${3:// Do something}
7+
})
8+
"""
39
'Vue Two-way Filter':
4-
'prefix': 'vue2wayfilter',
10+
'prefix': 'v2wayfilter',
511
'body': """
612
Vue.filter('1ドル', {
713
\tread (val2ドル) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /