RequireJS snippets for Atom
Adding shortcuts for defining and importing modules with RequireJS.
Install
apm install requirejs-snippets
Snippets
Define a module
define(['<deps>'], function (<deps>) {
var exports = {
};
return exports;
});
Define a module with a name
define('<name>', ['<deps>'], function (<deps>) {
var exports = {
};
return exports;
});
Import a module
require('<deps>', function (<deps>) {
});