Skip to content

Instantly share code, notes, and snippets.

@fivetanley
Forked from iammerrick/gist:2481564
Created April 24, 2012 17:10
Show Gist options
  • Save fivetanley/2481581 to your computer and use it in GitHub Desktop.
Save fivetanley/2481581 to your computer and use it in GitHub Desktop.
RequireJS Coffeescript
(function() {
require.config({
paths: {
'jquery': 'vendor/jquery-1.7.2',
'backbone': 'vendor/backbone',
'underscore': 'vendor/underscore',
'handlebars': 'vendor/handlebars-1.0.0.beta.6',
'text': 'vendor/require.text',
'i18n': 'vendor/i18n',
'use': 'vendor/use'
},
use: {
'underscore': {
attach: '_'
},
'backbone': {
deps: ['use!underscore', 'jquery'],
attach: function(_, $) {
return Backbone;
}
},
'vendor/keymaster': {
attach: 'key'
},
'handlebars': {
attach: 'Handlebars'
}
}
});
({
packages: [
{
name: 'domo',
location: 'lib/domo'
}, {
name: 'messages'
}
]
});
require(['jquery', 'controllers/app'], function($, App) {
return new App({
el: document.body
}).render();
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment