Meteor Sublime Snippets
<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>
<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>
<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>
<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>