moodle/message/amd/build/message_notification_preference.min.js.map
Andrew Nicols 0a4047ab31 MDL-73915 js: Switch amd minification to terser
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.
2022-02-23 08:55:09 +08:00

1 line
2.7 KiB
Plaintext

{"version":3,"file":"message_notification_preference.min.js","sources":["../src/message_notification_preference.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 <http://www.gnu.org/licenses/>.\n\n/**\n * Controls the preference for an individual notification type on the\n * message preference page.\n *\n * @module core_message/message_notification_preference\n * @copyright 2016 Ryan Wyllie <ryan@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core_message/notification_preference'],\n function($, NotificationPreference) {\n\n var SELECTORS = {\n PREFERENCE_KEY: '[data-preference-key]',\n };\n\n /**\n * Constructor for the Preference.\n *\n * @class\n * @param {object} element jQuery object root element of the preference\n * @param {int} userId The current user id\n */\n var MessageNotificationPreference = function(element, userId) {\n NotificationPreference.call(this, element, userId);\n };\n\n /**\n * Clone the parent prototype.\n */\n MessageNotificationPreference.prototype = Object.create(NotificationPreference.prototype);\n\n /**\n * Set constructor.\n */\n MessageNotificationPreference.prototype.constructor = MessageNotificationPreference;\n\n /**\n * Get the unique prefix key that identifies this user preference.\n *\n * @method getPreferenceKey\n * @return {string}\n */\n MessageNotificationPreference.prototype.getPreferenceKey = function() {\n return this.root.find(SELECTORS.PREFERENCE_KEY).attr('data-preference-key');\n };\n\n return MessageNotificationPreference;\n});\n"],"names":["define","$","NotificationPreference","SELECTORS","MessageNotificationPreference","element","userId","call","this","prototype","Object","create","constructor","getPreferenceKey","root","find","attr"],"mappings":";;;;;;;;AAuBAA,sDAAO,CAAC,SAAU,yCACV,SAASC,EAAGC,4BAEZC,yBACgB,wBAUhBC,8BAAgC,SAASC,QAASC,QAClDJ,uBAAuBK,KAAKC,KAAMH,QAASC,gBAM/CF,8BAA8BK,UAAYC,OAAOC,OAAOT,uBAAuBO,YAKvCG,YAAcR,8BAQtDA,8BAA8BK,UAAUI,iBAAmB,kBAChDL,KAAKM,KAAKC,KAAKZ,0BAA0Ba,KAAK,wBAGlDZ"}