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:
Tobias Witt 2014-08-01 10:06:40 +02:00
parent 6414b58211
commit a83775cfeb
2 changed files with 25 additions and 0 deletions

View 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}

View 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};
});