Skip to content

Instantly share code, notes, and snippets.

@freshteapot
Created March 29, 2013 21:43
Show Gist options
  • Save freshteapot/5273876 to your computer and use it in GitHub Desktop.
Save freshteapot/5273876 to your computer and use it in GitHub Desktop.
A sample of the requirejs config I am using.
/*global require*/
'use strict';
// Require.js allows us to configure shortcut alias
require.config({
baseUrl: 'js',
// The shim config allows us to configure dependencies for
// scripts that do not call define() to register a module
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: [
'underscore',
'zepto'
],
exports: 'Backbone'
},
backboneLocalstorage: {
deps: ['backbone'],
exports: 'Store'
}
},
paths: {
zepto: '../../components/zepto/zepto',
underscore: '../../components/underscore/underscore',
backbone: '../../components/backbone/backbone',
text: '../../components/requirejs-text/text',
mustache: '../../components/mustache/0.72/mustache'
},
waitSeconds: 15
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment