Created
January 16, 2017 13:18
-
-
Save TechplexEngineer/6613d381edd7b03b1150a90bcaac2df6 to your computer and use it in GitHub Desktop.
Meteor Sublime Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
console.log(${1}); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>co</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.javascript</scope> --> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
import { Mongo } from 'meteor/mongo'; | |
import { check, Match } from 'meteor/check'; | |
import { SimpleSchema } from 'meteor/aldeed:simple-schema'; | |
class ${1:ManualSections}Collection extends Mongo.Collection { | |
} | |
const ${1:ManualSections} = new ${1:ManualSections}Collection('${1:ManualSections}'); | |
export default ${1:ManualSections}; | |
// Deny all client-side updates since we will be using methods to manage this collection | |
${1:ManualSections}.deny({ | |
insert() { return true; }, | |
update() { return true; }, | |
remove() { return true; }, | |
}); | |
${1:ManualSections}.schema = new SimpleSchema({ | |
${0} | |
}); | |
${1:ManualSections}.attachSchema(${1:ManualSections}.schema); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>col</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
<template name="${1}"> | |
${0} | |
</template> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>tpl</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.html</scope> --> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
FlowRouter.route('${1:/}', { | |
name: '${2:userreg}', | |
title: '${3}', | |
action: function(params) { | |
BlazeLayout.render('layout', {content: '${2:userreg}'}); | |
} | |
}); | |
Template.${2:userreg}.onCreated(function ${2:userreg}OnCreated(){ | |
this.autorun(() => { | |
// this.subscribe('pub'); | |
}); | |
}); | |
Template.${2:userreg}.onRendered(function ${2:userreg}OnRendered(){}); | |
Template.${2:userreg}.events({ | |
'submit form'(event) { | |
event.preventDefault(); | |
},${0} | |
}); | |
Template.${2:userreg}.helpers({}); | |
Template.${2:userreg}.onDestroyed(function ${2:userreg}OnDestroyed(){}); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>tpl2</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.javascript</scope> --> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment