Skip to content

Instantly share code, notes, and snippets.

@steve-ross
Created February 22, 2017 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-ross/c2f96fe86e73ad3fd980805696143e0d to your computer and use it in GitHub Desktop.
Save steve-ross/c2f96fe86e73ad3fd980805696143e0d to your computer and use it in GitHub Desktop.
meteor snippets for vscode
{
"Meteor onCreated Method": {
"prefix": "mon",
"body": [
"Template.${1:name}.onCreated(function ${1:name}OnCreated() {",
"\tconst instance = this;",
"\t$0",
"\tinstance.autorun(() => {",
"\t});",
"});"
],
"description": "meteor oncreated template"
},
"Meteor event handler": {
"prefix": "mev",
"body": [
"Template.${1:name}.events({",
"\t'click .${2:target}'(e,t){",
"\t\t$0",
"\t}",
"});"
],
"description": "meteor event handler template"
},
"Meteor helper": {
"prefix": "mhe",
"body": [
"Template.${1:name}.helpers({",
"\t'${2:helperName}'(){",
"\t\tconst instance = Template.instance();",
"\t\t$0",
"\t}",
"});"
],
"description": "meteor event handler template"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment