Add CommonJS snippet
This commit is contained in:
parent
f407b69097
commit
613d84e2ac
@ -162,4 +162,10 @@ snippet req "require an AMD module"
|
|||||||
require([${1:'dependencies'}], ${2:callback});
|
require([${1:'dependencies'}], ${2:callback});
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
# CommonJS snippets
|
||||||
|
|
||||||
|
snippet vreq "assign a CommonJS-style module to a var"
|
||||||
|
var ${0:${1/(.+\/)*(\w+)(-|\b|$)(\..+$)?/\u$2/g}} = require('${1}');
|
||||||
|
endsnippet
|
||||||
|
|
||||||
# vim:ft=snippets:
|
# vim:ft=snippets:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user