Massage require.js's config so that builds work
without underscore.js
This commit is contained in:
parent
63888dd454
commit
da23015ced
|
@ -45,6 +45,7 @@ require.config({
|
|||
"tpl": "node_modules/lodash-template-loader/loader",
|
||||
"typeahead": "components/typeahead.js/index",
|
||||
"lodash": "node_modules/lodash/lodash",
|
||||
"underscore": "src/underscore-shim",
|
||||
"utils": "src/utils",
|
||||
|
||||
// Converse
|
||||
|
@ -190,6 +191,8 @@ require.config({
|
|||
// for their 'jquery' dependency.
|
||||
'*': {
|
||||
'jquery': 'jquery-private',
|
||||
},
|
||||
'backbone': {
|
||||
"underscore": "lodash"
|
||||
},
|
||||
// 'jquery-private' wants the real jQuery module
|
||||
|
@ -222,6 +225,7 @@ require.config({
|
|||
'bigint': { deps: ['crypto'] },
|
||||
'strophe.ping': { deps: ['strophe'] },
|
||||
'strophe.register': { deps: ['strophe'] },
|
||||
'strophe.vcard': { deps: ['strophe'] }
|
||||
'strophe.vcard': { deps: ['strophe'] },
|
||||
'backbone': { deps: ['underscore'] }
|
||||
}
|
||||
});
|
||||
|
|
4
src/underscore-shim.js
Normal file
4
src/underscore-shim.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*global define */
|
||||
define('underscore', ['lodash'], function (_) {
|
||||
return _;
|
||||
});
|
|
@ -3,6 +3,7 @@ define('jquery', [], function () { return jQuery; });
|
|||
define('jquery.browser', [], function () { return jQuery; });
|
||||
define('typeahead', [], function () { return jQuery; });
|
||||
define('lodash', [], function () { return _; });
|
||||
define('underscore', [], function () { return _; });
|
||||
define('moment_with_locales', [], function () { return moment; });
|
||||
define('strophe', [], function () {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user