Skip to content

Instantly share code, notes, and snippets.

@neonstalwart
Last active December 17, 2015 08:38
Show Gist options
  • Save neonstalwart/5581049 to your computer and use it in GitHub Desktop.
Save neonstalwart/5581049 to your computer and use it in GitHub Desktop.
a couple of useful dojo ST2 snippets
<snippet>
<content><![CDATA[
define([
${1:'dojo/_base/declare'}
], function (${2:declare}) {
return declare(${3});
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>define</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
<snippet>
<content><![CDATA[
this.inherited(arguments);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>inherited</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
<snippet>
<content><![CDATA[
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
'dijit/_TemplatedMixin',
'dojo/text!./template/${TM_FILENAME/\.js$/.html/}'
], function (declare, Widget, Templated, template) {
return declare([Widget, Templated], {
templateString: template${1}
});
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>templated</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment