Created
          July 17, 2012 19:13 
        
      - 
      
- 
        Save emjayess/3131358 to your computer and use it in GitHub Desktop. 
    alternative approaches / patterns to AMD-style module loading
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /** | |
| * 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