Skip to content

Instantly share code, notes, and snippets.

@fivetanley
Created April 24, 2012 17:28
Show Gist options
  • Save fivetanley/2481738 to your computer and use it in GitHub Desktop.
Save fivetanley/2481738 to your computer and use it in GitHub Desktop.
for merrick <3
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':
# Right here you didn't use an array, so logically CoffeeScript freaked out that you tried to assign two values
# to an object.
deps: ['use!underscore', 'jquery']
attach: (_, $) ->
return Backbone
'vendor/keymaster':
attach: 'key'
'handlebars':
attach: 'Handlebars'
require ['jquery', 'controllers/app'], ($, App) ->
new App({el : document.body}).render()
@iammerrick
Copy link

You rock man!

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