Skip to content

Instantly share code, notes, and snippets.

@emjayess
Created July 17, 2012 19:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emjayess/3131358 to your computer and use it in GitHub Desktop.
Save emjayess/3131358 to your computer and use it in GitHub Desktop.
alternative approaches / patterns to AMD-style module loading
/**
* AMD module loading patterns: 2 possible approaches
*/
define(['dojo/query', 'dojo/on'], function(query, on){
// my module code
});
// oft-favored for maintaining modules per line of code
define(function(require) {
var query = require('dojo/query');
var on = require('dojo/on');
//...
// my module code
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment