Skip to content

Instantly share code, notes, and snippets.

@prrraveen
Created July 29, 2015 08:48
Show Gist options
  • Save prrraveen/e795a310e8e26ab8f468 to your computer and use it in GitHub Desktop.
Save prrraveen/e795a310e8e26ab8f468 to your computer and use it in GitHub Desktop.
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
'.source.js':
'View':
'prefix': 'vi'
'body': """
define(['backbone',
],
function(Backbone){
var Footer= Backbone.View.extend({
el: '#footer',
child_views : [],
initialize : function(options){
_.extend(this,options);
this.render();
},
render : function(){
var template = window['JST']['templates/footer.html'];
this.$el.html(template);
this.initialize_ui();
},
events:{
},
initialize_ui : function(){
}
})
return Footer
})
"""
'.source.js':
'View':
'prefix': 'col'
'body': """
define(['backbone',
'search/models/Item'
],
function(Backbone,
Item
){
var Items= Backbone.collection.extend({
model : Item
})
return Items
})
"""
'.source.js':
'View':
'prefix': 'mod'
'body': """
define(['backbone',
],
function(Backbone,
){
var = Backbone.Model.extend({
model : Item
})
return
})
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment