public
Last active

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* 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(...);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.