Skip to content

Instantly share code, notes, and snippets.

@thollingshead
Created February 4, 2016 21:06
Show Gist options
  • Save thollingshead/273c5d546030192cab4a to your computer and use it in GitHub Desktop.
Save thollingshead/273c5d546030192cab4a to your computer and use it in GitHub Desktop.
Sublime snippet for Dojo widget boilerplate, with commented out lifecycle methods.
<snippet>
<content><![CDATA[
define([
'dijit/_WidgetBase',
'dojo/_base/declare'
], function(
_WidgetBase,
declare
) {
return declare([_WidgetBase], {
// Widget LifeCycle
${1:/*constructor: function() \{
$2
\},*/}
${3:/*postMixInProperties: function() \{
this.inherited(arguments);$4
\},*/}
${5:/*buildRendering: function() \{
this.inherited(arguments);$6
\},*/}
${7:/*postCreate: function() \{
this.inherited(arguments);$8
\},*/}
${9:/*startup: function() \{
this.inherited(arguments);$10
\},*/}
${11:/*destroy: function() \{
this.inherited(arguments);$12
\}*/}$13
});
});
]]></content>
<tabTrigger>define()</tabTrigger>
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment