Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
/* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment