Skip to content

Instantly share code, notes, and snippets.

@thollingshead
Last active February 4, 2016 20:35
Show Gist options
  • Save thollingshead/7ba4a1c3a4d498f27039 to your computer and use it in GitHub Desktop.
Save thollingshead/7ba4a1c3a4d498f27039 to your computer and use it in GitHub Desktop.
Sublime snippet for Dojo widget boilerplate.
<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