Skip to content

Instantly share code, notes, and snippets.

@inhji
Created May 19, 2014 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inhji/bc19ee73668d63bd75d7 to your computer and use it in GitHub Desktop.
Save inhji/bc19ee73668d63bd75d7 to your computer and use it in GitHub Desktop.
Underscore, Underscore.string and RequireJS
requirejs.config({
paths: {
'backbone' : '../lib/backbone/backbone',
'backbone.base' : '../lib/backbone/backbone.base',
'backbone.extensions' : '../lib/backbone/backbone.extensions',
'jquery' : '../lib/jquery/jquery',
'text' : '../lib/require/text',
'underscore' : '../lib/underscore/underscore',
'underscore.mixed' : '../lib/underscore/underscore.mixed',
'underscore.string' : '../lib/underscore/underscore.string'
},
shim: {
'backbone.base': {
deps: ['underscore.mixed', 'jquery'],
exports: 'Backbone'
},
}
});
define([
'underscore',
'underscore.string'
], function(_, _s) {
_.mixin(_s.exports());
return _;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment