Skip to content

Instantly share code, notes, and snippets.

@anareyna
Last active May 10, 2016 19:23
Show Gist options
  • Save anareyna/9355125 to your computer and use it in GitHub Desktop.
Save anareyna/9355125 to your computer and use it in GitHub Desktop.
Estructura de módulo en coffescript
<snippet>
<content><![CDATA[
###
${2:Module description}
@class ${1:module_name}
@main ${3:flux/account}
@author ${4:Ana Reyna}
###
yOSON.AppCore.addModule "${1:module_name}", (Sb) ->
dom = {}
st =
${5:btnRegister} : "${6:.btn_register}"
catchDom = ->
dom.${5:btnRegister} = \$(st.${5:btnRegister})
return
suscribeEvents = ->
dom.${7:btnRegister}.on "${8:click}", events.${9:sendEmail}
return
events =
${9:sendEmail} : ->
console.log "${9:sendEmail}"
return
initialize = (oP) ->
\$.extend st, oP
catchDom()
suscribeEvents()
return
return {
init: initialize
}
, [${10:"js/dist/libs/jquery-ui/jquery-ui.min.js"}]
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>addCoffee</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment