Skip to content

Instantly share code, notes, and snippets.

@winfried-van-loon
Last active November 12, 2015 01:39
Show Gist options
  • Save winfried-van-loon/30df67bd3edbe893cdfb to your computer and use it in GitHub Desktop.
Save winfried-van-loon/30df67bd3edbe893cdfb to your computer and use it in GitHub Desktop.
JS module
<snippet>
<!-- Example: Hello, ${1:this} is a ${2:snippet}. -->
<content><![CDATA[
/**
* ${2:[${1:module} description]}
*
* @type {Object}
*/
var ${1:module} = {
${3:settings: \{\},}
initialize: function() {
this.eventHandlers();${4}
},
eventHandlers: function() {}
};
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>jsmodule</tabTrigger>
<description>Create module for JS</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js, comment.block.documentation.js, punctuation.definition.comment.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment