kkostov/vue-atom-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package is an Atom port of the excellent Vue VSCode Snippets by @sdras.

My main motivation for creating this package is that I often need to switch between Atom and VSCode and I really, really love the snippets Sarah Drasner crafted for VSCode.

The goals of this package are

  • To remain compatible with the vue-vscode-snippets - all prefixes from the original repository should be available and should produce the same output.

  • Implement Atom-specific tweaks and improvements which can help productivity.

  • The package does not aim to become an "ubermegablob" of snippets but rather focus on parts which are useful in every day code work.

  • The scope of the snippets is the core ecosystem around Vue, including vue, vuex, vue-router and nuxt. This is just a baseline, others may added as needed.

apm install vue-atom-snippets

The snippets provided by the plugin will be available in all .vue files as well as .js (e.g. nuxt.config.js).

SnippetPurpose
vbaseSingle file component base
SnippetPurpose
vforv-for directive
vmodelSemantic v-model directive
vmodel-numSemantic v-model number directive
vonv-on click handler with arguments
vel-propsComponent element with props
vsrcImage src binding
vstyleInline style binding
vstyle-objInline style binding with objects
vclassClass binding
vclass-objClass binding with objects
vclass-obj-multMultiple conditional class bindings
vanimTransition component with JS hooks
vnuxtlNuxt Routing Link
SnippetPurpose
vdataComponent data as a function
vmethodVue method
vcomputedVue computed property
vwatcherVue watcher with new and old value args
vpropsProps with type and default
vimportImport one component into another
vimport-cImport one component into another within the export statement
vimport-exportImport one component into another and use it within the export statement
vfilterVue filter
vmixinCreate a Vue Mixin
vmixin-useBring a mixin into a component to use
vc-directVue create a custom directive
vimport-libImport a library
vimport-gsapImport GreenSock with Timeline and Eases
vanimhook-jsUsing the Transition component JS hooks in methods
vcommitCommit to Vuex store in methods for mutation
vdisDis to Vuex store in methods for action
vtestA simple unit testing component
vincincrementer
vdecdecrementer
SnippetPurpose
vstoreBase for Vuex store.js
vgetterVuex Getter
vmutationVuex Mutation
vactionVuex Action
vstore-importImport vuex store into main.js
SnippetPurpose
nfontlink to include fonts in a nuxt project, in nuxt-config
ncsslink to css assets such as normalize
nmodadd module entry
nplugsadd plugins for global level functionality
nplugadd a plugin to the plugins section
SnippetPurpose
nasyncdataNuxt asyncData
nfetchNuxt Fetch
nheadNuxt Head
SnippetPurpose
gitignore.gitignore file presets

About

Vue snippets to πŸš€ my daily Vue workflow. Originally a port of the excellent https://.com/sdras/vue-vscode-snippets

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •