Skip to content

Instantly share code, notes, and snippets.

@tbranyen
Created January 16, 2012 18:23
Show Gist options
  • Save tbranyen/1622155 to your computer and use it in GitHub Desktop.
Save tbranyen/1622155 to your computer and use it in GitHub Desktop.
use.js from a real app
require.config({
...
use: {
// Libraries
backbone: {
deps: ["use!underscore", "jquery"],
attach: "Backbone"
},
underscore: {
attach: "_"
},
combyne: {
attach: "combyne"
},
phonegap: {
attach: "PhoneGap"
},
// Plugins
"plugins/NativeControls": {
deps: ["use!phonegap"],
attach: "plugins"
},
"plugins/backbone.layoutmanager": {
deps: ["use!backbone"]
},
"plugins/backbone.memento": {
deps: ["use!backbone"]
},
"plugins/vertebrae": {
deps: ["use!backbone"]
}
}
}
define([
"namespace",
"use!backbone",
// Modules
"util",
"use!phonegap",
"use!plugins/NativeControls",
],
function(myapp, Backbone, Util, PhoneGap, NativeControls) {
...
});
@tbranyen
Copy link
Author

Thanks for the heads up @quartzmo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment