Created
May 19, 2014 08:55
-
-
Save inhji/bc19ee73668d63bd75d7 to your computer and use it in GitHub Desktop.
Underscore, Underscore.string and RequireJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
}, | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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