From af604082df7fed6c99ab95faa38702dc5ae05213 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 18 May 2023 15:45:25 +0800 Subject: [PATCH] MDL-78306 core: Migrate core/config to ESM --- lib/amd/build/config.min.js | 17 +++++++++-------- lib/amd/build/config.min.js.map | 2 +- lib/amd/src/config.js | 6 ++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/amd/build/config.min.js b/lib/amd/build/config.min.js index d69d734840a..fae681c11a7 100644 --- a/lib/amd/build/config.min.js +++ b/lib/amd/build/config.min.js @@ -1,11 +1,12 @@ +define("core/config",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0; /** - * Expose the M.cfg global variable. - * - * @module core/config - * @copyright 2015 Damyon Wiese - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @since 2.9 - */ -define("core/config",(function(){return M.cfg})); + * Expose the M.cfg global variable. + * + * @module core/config + * @copyright 2015 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @since 2.9 + */ +var _default=M.cfg;return _exports.default=_default,_exports.default})); //# sourceMappingURL=config.min.js.map \ No newline at end of file diff --git a/lib/amd/build/config.min.js.map b/lib/amd/build/config.min.js.map index 390761a9d43..6159b5b5e5e 100644 --- a/lib/amd/build/config.min.js.map +++ b/lib/amd/build/config.min.js.map @@ -1 +1 @@ -{"version":3,"file":"config.min.js","sources":["../src/config.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Expose the M.cfg global variable.\n *\n * @module core/config\n * @copyright 2015 Damyon Wiese \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 2.9\n */\ndefine(function() {\n // This module exposes only the raw data from M.cfg;\n return M.cfg;\n});\n"],"names":["define","M","cfg"],"mappings":";;;;;;;;AAuBAA,sBAAO,kBAEIC,EAAEC"} \ No newline at end of file +{"version":3,"file":"config.min.js","sources":["../src/config.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Expose the M.cfg global variable.\n *\n * @module core/config\n * @copyright 2015 Damyon Wiese \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 2.9\n */\n// This module exposes only the raw data from M.cfg;\nexport default M.cfg;\n"],"names":["M","cfg"],"mappings":";;;;;;;;;aAwBeA,EAAEC"} \ No newline at end of file diff --git a/lib/amd/src/config.js b/lib/amd/src/config.js index 82084bfcab0..a5540376f53 100644 --- a/lib/amd/src/config.js +++ b/lib/amd/src/config.js @@ -21,7 +21,5 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 2.9 */ -define(function() { - // This module exposes only the raw data from M.cfg; - return M.cfg; -}); +// This module exposes only the raw data from M.cfg; +export default M.cfg;