mirror of
https://github.com/moodle/moodle.git
synced 2025-07-26 00:31:35 +02:00
Unfortunately the babel minify-mangle plugin seems to be abandoned and in certain circumstances can be very buggy. The only safe options are to disable it, or to switch to a different minification library. Not minifying our javascript is not ideal, so this commit updates the javascript tasks to use a rollup, combined with babel, and terser. Babel still converts code from ES/UMD/AMD to AMD modules with the relevant browser support, whilst terser minifies the code. The rollup bundler handles tracking and creation of sourcemaps, and supports better parallelisation of the tasks. Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core and eslint, which change the built files anyway, this seems like the ideal time to make this change.
11 lines
875 B
JavaScript
11 lines
875 B
JavaScript
/**
|
|
* A registry for the different types of modal.
|
|
*
|
|
* @module core/modal_registry
|
|
* @class modal_registry
|
|
* @copyright 2016 Ryan Wyllie <ryan@moodle.com>
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/
|
|
define("core/modal_registry",["core/notification","core/prefetch"],(function(Notification,Prefetch){var registry={},get=function(type){return registry[type]};return{register:function(type,module,template){get(type)&&Notification.exception({message:"Modal of type '"+type+"' is already registered"}),module&&"function"==typeof module||Notification.exception({message:"You must provide a modal module"}),template||Notification.exception({message:"You must provide a modal template"}),registry[type]={module:module,template:template},Prefetch.prefetchTemplate(template)},get:get}}));
|
|
|
|
//# sourceMappingURL=modal_registry.min.js.map
|