diff -u b/core/assets/vendor/jquery.ui/ui/data.js b/core/assets/vendor/jquery.ui/ui/data.js --- b/core/assets/vendor/jquery.ui/ui/data.js +++ b/core/assets/vendor/jquery.ui/ui/data.js @@ -15,25 +15,25 @@ ( function( factory ) { - if ( typeof define === "function" && define.amd ) { + if ( typeof define === "function" && define.amd ) { - // AMD. Register as an anonymous module. - define( [ "jquery", "./version" ], factory ); - } else { + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { - // Browser globals - factory( jQuery ); - } + // Browser globals + factory( jQuery ); + } } ( function( $ ) { - return $.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo( function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - } ) : +return $.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) : - // Support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - } - } ); + // Support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + } +} ); } ) ); diff -u b/core/scripts/js/jqueryui-build.js b/core/scripts/js/jqueryui-build.js --- b/core/scripts/js/jqueryui-build.js +++ b/core/scripts/js/jqueryui-build.js @@ -6,8 +6,10 @@ * Run build:jqueryui with --file to only parse a specific file. * @example Only process assets/vendor/jquery.ui/ui/widget.js and * assets/vendor/jquery.ui/ui/plugin.jsCheck if all files have been compiled correctly { + log(`'${filePath}' is being checked.`); + // Transform the file. + const file = fs.readFileSync(filePath, 'utf-8'); + const result = Terser.minify(file); + const fileName = filePath.slice(0, -3); + fs.readFile(`${fileName}-min.js`, function read(err, data) { + if (err) { + log(chalk.red(err)); + process.exitCode = 1; + return; + } + if (result.code !== data.toString()) { + log(chalk.red(`'${filePath}' is not updated.`)); + process.exitCode = 1; + } + }); +};