mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added sublime requirejs snippets
This commit is contained in:
parent
b4ef1203b1
commit
9f8b3537a9
2 changed files with 52 additions and 0 deletions
28
snippets/sublime/js-define-extend.sublime-snippet
Normal file
28
snippets/sublime/js-define-extend.sublime-snippet
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<snippet>
|
||||
<content><![CDATA[
|
||||
define([
|
||||
"${2:Path}"
|
||||
],
|
||||
|
||||
function(Parent) {
|
||||
|
||||
function ${1:Module}() {
|
||||
Parent.call(this);
|
||||
}
|
||||
|
||||
${1:Module}.prototype = Object.create(Parent.prototype);
|
||||
|
||||
${1:Module}.prototype.${3:name} = function(${4:arguments}) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ${1:Module};
|
||||
|
||||
});
|
||||
]]></content>
|
||||
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
|
||||
<tabTrigger>defex</tabTrigger>
|
||||
<!-- Optional: Set a scope to limit where the snippet will trigger -->
|
||||
<scope>source.js</scope>
|
||||
<description>define(..) - create a new extended require.js module</description>
|
||||
</snippet>
|
||||
24
snippets/sublime/js-define.sublime-snippet
Normal file
24
snippets/sublime/js-define.sublime-snippet
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<snippet>
|
||||
<content><![CDATA[
|
||||
define([
|
||||
],
|
||||
|
||||
function() {
|
||||
|
||||
function ${1:Module}() {
|
||||
}
|
||||
|
||||
${1:Module}.prototype.${2:name} = function(${3:arguments}) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ${1:Module};
|
||||
|
||||
});
|
||||
]]></content>
|
||||
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
|
||||
<tabTrigger>def</tabTrigger>
|
||||
<!-- Optional: Set a scope to limit where the snippet will trigger -->
|
||||
<scope>source.js</scope>
|
||||
<description>define(..) - create a new require.js module</description>
|
||||
</snippet>
|
||||
Loading…
Add table
Add a link
Reference in a new issue