From eb8ca2c4c5fa518078a6b22be25fadf222bbbd12 Mon Sep 17 00:00:00 2001 From: lxynox Date: Thu, 2 Mar 2017 01:52:13 -0500 Subject: [PATCH 1/3] rm deprecated vue-partial --- snippets/vue-partial.cson | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 snippets/vue-partial.cson diff --git a/snippets/vue-partial.cson b/snippets/vue-partial.cson deleted file mode 100644 index 0242eaf..0000000 --- a/snippets/vue-partial.cson +++ /dev/null @@ -1,6 +0,0 @@ -'.source.js': - 'Vue Partial': - 'prefix': 'vpartial', - 'body': """ - Vue.partial('$1', '$2') - """ From b3cd331541015a6579502528d97ac8a9f0fa1042 Mon Sep 17 00:00:00 2001 From: lxynox Date: Thu, 2 Mar 2017 02:18:41 -0500 Subject: [PATCH 2/3] readme... --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e6edba4..5c4ec25 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # Vue Snippets -Vue.js 1.0+ ES6 snippets for Atom +Vue.js 2.0+ *ES6* snippets for Atom -Contributions are appreciated. Please fork this repository and open a PR to add snippets and fix bugs. From 784d50432542763e50388342bad13cfac2e782bf Mon Sep 17 00:00:00 2001 From: lxynox Date: Sat, 11 Mar 2017 18:16:07 -0500 Subject: [PATCH 3/3] wip --- snippets/vue-component.cson | 132 +++++++++++++++++++++-------------- snippets/vue-directives.cson | 45 ++++-------- 2 files changed, 95 insertions(+), 82 deletions(-) diff --git a/snippets/vue-component.cson b/snippets/vue-component.cson index ae05d55..7399977 100644 --- a/snippets/vue-component.cson +++ b/snippets/vue-component.cson @@ -1,53 +1,81 @@ '.text.html.vue': - 'Vue Template Tag': - 'prefix': 'vtemplate', - 'body': """ - $0 - """ - 'Vue Script Tag': - 'prefix': 'vscript', - 'body': """ - - \texport default { - \t\t// Options / Data - \t\tdata () { - \t\t\treturn {} - \t\t}, - \t\tprops: [], - \t\tcomputed: {}, - \t\tmethods: {}// , - \t\t// watch: {}, - \t\t// Options / DOM - \t\t// el () {}, - \t\t// replace: true, - \t\t// template: '', - \t\t// Options / Lifecycle Hooks - \t\t// init () {}, - \t\t// crated () {}, - \t\t// beforeCompile () {}, - \t\t// compiled () {}, - \t\t// ready () {}, - \t\t// attached () {}, - \t\t// detached () {}, - \t\t// beforeDestroy () {}, - \t\t// destroyed () {}, - \t\t// Options / Assets - \t\t// directives: {}, - \t\t// elementDirectives: {}, - \t\t// filters: {}, - \t\t// components: {}, - \t\t// transitions: {}, - \t\t// partials: {}, - \t\t// Options / Misc - \t\t// parent: null, - \t\t// events: {}, - \t\t// mixins: [], - \t\t// name: '' - \t} - - """ - 'Vue Style Tag': - 'prefix': 'vstyle', - 'body': """ - $0 - """ + 'Vue all': + 'prefix': 'vall' + 'body': """ + + $0 + + + + export default { + name: '', + props: [], + components: {}, + data () { + return {} + }, + computed: {}, + methods: {} + } + + + + + + """ + + 'Vue Template Tag': + 'prefix': 'vtem' + 'body': """ + $0 + """ + + 'Vue Script Tag': + 'prefix': 'vsc' + 'body': """ + + export default { + // Options / Data + props: [], + data () { + return {} + }, + methods: {}, + computed: {}, + // watch: {}, + // Options / DOM + // el: '', + // template: '', + // render(h) {}, + // renderError(h) {}, // dev mode only, with hot-reload + // Options / Lifecycle Hooks + // beforeCreated () {}, + // created () {}, + // beforeMount() {}, + // mounted() {}, + // beforeUpdate() {}, + // updated() {}, + // activated() {}, + // deactivated() {}, + // beforeDestroy () {}, + // destroyed () {}, + // Options / Assets + // directives: {}, + // filters: {}, + // components: {}, + // Options / Misc + // name: '', + // functional: true, + // Options / Composition + // parent: null, + // mixins: [], + // extends: {} // short-hand of Vue.extend + } + + """ + + 'Vue Style Tag': + 'prefix': 'vst' + 'body': """ + $0 + """ diff --git a/snippets/vue-directives.cson b/snippets/vue-directives.cson index dd63154..14e8bcf 100644 --- a/snippets/vue-directives.cson +++ b/snippets/vue-directives.cson @@ -1,31 +1,16 @@ '.source.js': - 'Vue Directive': - 'prefix': 'vdirective', - 'body': """ - Vue.directive('$1', { - \tbind () {}, - \tupdate (value) {}, - \tunbind () {}${2:// }, - \t${3:// }params: [$4], - \t${5:// }paramWatchers: {$6}, - \t${7:// }deep: ${8:false}, - \t${9:// }twoWay: ${10:false}, - \t${11:// }acceptStatement: ${12:false}, - \t${13:// }priority: ${14:1000} - }) - """ - 'Vue Element Directive': - 'prefix': 'veldirective', - 'body': """ - Vue.elementDirective('$1', { - \tbind () {}, - \tupdate (value) {}, - \tunbind () {}${2:// }, - \t${3:// }params: [$4], - \t${5:// }paramWatchers: {$6}, - \t${7:// }deep: ${8:false}, - \t${9:// }twoWay: ${10:false}, - \t${11:// }acceptStatement: ${12:false}, - \t${13:// }priority: ${14:1000} - }) - """ + 'Vue Directive': + 'prefix': 'vdir', + 'body': """ + Vue.directive('$1', { + \tbind () {}, + \tupdate (value) {}, + \tunbind () {}${2:// }, + \t${3:// }params: [$4], + \t${5:// }paramWatchers: {$6}, + \t${7:// }deep: ${8:false}, + \t${9:// }twoWay: ${10:false}, + \t${11:// }acceptStatement: ${12:false}, + \t${13:// }priority: ${14:1000} + }) + """