Skip to content

Instantly share code, notes, and snippets.

@mikeknoop
Created June 15, 2012 03:18
Show Gist options
  • Save mikeknoop/2934489 to your computer and use it in GitHub Desktop.
Save mikeknoop/2934489 to your computer and use it in GitHub Desktop.
require.config(
baseUrl: '/static/js/src',
paths:
app: 'app',
backbone: '../external/backbone/0.9.2/backbone',
backboneanalytics:'../external/backbone/analytics/0.0.2/backboneAnalytics'
backbonecache: 'backbone/cache/backboneCache', # coffee compiled
cookie: '../external/jquery/cookie/1.0.0/cookie',
error: 'error/error', # coffee compiled
escapesel: '../external/jquery/escapeSel/1.0.0/escapeSel',
jquery: '../external/jquery/1.7.0/jquery',
json: '../external/json/2.0.0/json',
log: '../external/log/log',
manipulation: 'jquery/manipulation/manipulation', # coffee compiled
message: 'message/message', # coffee compiled
mustache: '../external/mustache/0.4/mustache',
outerhtml: '../external/jquery/outerHtml/outerHtml',
prettyloader: '../external/jquery/prettyLoader/1.0.1/prettyLoader',
sentry: '../external/sentry/1.13.5/sentry',
snag: 'snag/snag', # coffee compiled
stripe: '../external/stripe/1.0.0/stripe',
template: '../../template',
text: '../external/require/text/1.0.0/text',
tooltip: '../external/tooltip/2.0.1/tooltip',
tour: 'tour/tour', # coffee compiled
underscore: '../external/underscore/1.3.1/underscore',
use: '../external/require/use/0.1.0/use',
# library dependecies
use:
backbone:
deps: ['use!underscore', 'jquery', 'json'],
attach: (_, $, Json) ->
return window.Backbone
backboneanalytics:
deps: ['use!backbone']
backbonecache:
deps: ['use!backbone']
attach: (Backbone) ->
return window.Backbone
cookie:
deps: ['jquery']
error:
deps: ['error']
attach: (ErrorHandler) ->
window.errorHanlder = ErrorHandler
return ErrorHandler
escapesel:
deps: ['jquery']
manipulation:
deps: ['jquery']
message:
deps: ['message']
attach: (Message) ->
window.messages = Message
return Message
tour:
deps: ['tour']
outerhtml:
deps: ['jquery']
prettyloader:
deps: ['jquery']
tooltip:
deps: ['jquery']
attach: ($) ->
return window.Tooltip
underscore:
attach: '_'
)
require([
'app',
],
(App) ->
App.initialize()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment