Implement RequireJS Optimizer in the LMS
TNL-2487
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
var commonLibrariesPath = 'common/js/common_libraries';
|
||||
|
||||
var getModule = function (moduleName, excludeCommonDeps) {
|
||||
var module = {
|
||||
name: moduleName
|
||||
};
|
||||
|
||||
if (excludeCommonDeps) {
|
||||
module.exclude = ['js/factories/common_deps'];
|
||||
module.exclude = [commonLibrariesPath];
|
||||
}
|
||||
|
||||
return module;
|
||||
};
|
||||
|
||||
var getModulesList = function (modules) {
|
||||
var result = [getModule('js/factories/common_deps')];
|
||||
var result = [getModule(commonLibrariesPath)];
|
||||
return result.concat(modules.map(function (moduleName) {
|
||||
return getModule(moduleName, true);
|
||||
}));
|
||||
@@ -84,6 +86,17 @@
|
||||
'tender': 'empty:',
|
||||
'youtube': 'empty:'
|
||||
},
|
||||
|
||||
/**
|
||||
* Inline requireJS text templates.
|
||||
*/
|
||||
inlineText: true,
|
||||
|
||||
/**
|
||||
* Stub out requireJS text in the optimized file, but leave available for non-optimized development use.
|
||||
*/
|
||||
stubModules: ["text"],
|
||||
|
||||
/**
|
||||
* If shim config is used in the app during runtime, duplicate the config
|
||||
* here. Necessary if shim config is used, so that the shim's dependencies
|
||||
@@ -1 +0,0 @@
|
||||
define(['domReady!', 'jquery', 'backbone', 'underscore', 'gettext', 'text']);
|
||||
Reference in New Issue
Block a user