Add snippets for requirejs module definitions for coffee- and javascript
The snippet that generates a require block is called `reqjs` in order to have no collision with the existing `req` snippet.
This commit is contained in:
parent
6414b58211
commit
a83775cfeb
11
snippets/coffee/requirejs_coffee.snippets
Normal file
11
snippets/coffee/requirejs_coffee.snippets
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
snippet def
|
||||||
|
define ["${1:#dependencies1}"], (${2:#dependencies2}) ->
|
||||||
|
${0:TARGET}
|
||||||
|
|
||||||
|
snippet defn
|
||||||
|
define "${1:#name}", ["${2:#dependencies1}"], (${3:#dependencies2}) ->
|
||||||
|
${0:TARGET}
|
||||||
|
|
||||||
|
snippet reqjs
|
||||||
|
require ["${1:#dependencies1}"], (${2:#dependencies2}) ->
|
||||||
|
${0:TARGET}
|
14
snippets/javascript/javascript-requirejs.snippets
Normal file
14
snippets/javascript/javascript-requirejs.snippets
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
snippet def
|
||||||
|
define(["${1:#dependencies1}"], function (${2:#dependencies2}) {
|
||||||
|
return ${0:TARGET};
|
||||||
|
});
|
||||||
|
|
||||||
|
snippet defn
|
||||||
|
define("${1:#name}", ["${2:#dependencies1}"], function (${3:#dependencies2}) {
|
||||||
|
return ${0:TARGET};
|
||||||
|
});
|
||||||
|
|
||||||
|
snippet reqjs
|
||||||
|
require(["${1:#dependencies1}"], function (${2:#dependencies2}) {
|
||||||
|
return ${0:TARGET};
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user