Skip to content

Instantly share code, notes, and snippets.

@ZeeAgency
Created February 23, 2012 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZeeAgency/1892141 to your computer and use it in GitHub Desktop.
Save ZeeAgency/1892141 to your computer and use it in GitHub Desktop.
/* RequireJS Path example */
// js/main.js
require({baseUrl: 'js'}, ['demo/1', 'my-lib/main'], function(demo1, myLib) {..});
// js/demo/1.js
define(['./2'], function(demo2) {..});
// js/demo/2.js
define(function() {});
// js/my-lib/main.js
define(['./utils', './ui', './model'], function(utils, ui, model) {..});
// js/my-lib/utils.js
// js/my-lib/ui.js
// js/my-lib/model.js
define(...);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment