Skip to content

Instantly share code, notes, and snippets.

@iammerrick
Created April 24, 2012 17:08
Show Gist options
  • Save iammerrick/2481564 to your computer and use it in GitHub Desktop.
Save iammerrick/2481564 to your computer and use it in GitHub Desktop.
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: (_, $) ->
return Backbone
'vendor/keymaster':
attach: 'key'
'handlebars' :
attach: 'Handlebars'
packages: [{
name: 'domo'
location: 'lib/domo'
}, {
name : 'messages'
}
]
require ['jquery', 'controllers/app'], ($, App) ->
new App(el : document.body).render()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment