diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2025-03-03 18:58:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-03 18:58:38 +0100 |
commit | 302b488b9214e14830496578f7cf0aebcc33c132 (patch) | |
tree | aa78b29148b71cb70e00287f91a045ca12cf0475 /Gruntfile.js | |
parent | fd7dbcdff6b4cec9efadfa4a3e290c397afa3a02 (diff) | |
download | jquery-ui-302b488b9214e14830496578f7cf0aebcc33c132.tar.gz jquery-ui-302b488b9214e14830496578f7cf0aebcc33c132.zip |
Build: Switch from UglifyJS to SWC minify, make the minified file ES5
More recent UglifyJS versions have started converting regular functions to arrow
ones, making ES5 source file migrated to a ES2015+ minified one. We want to
avoid that even in 1.14.x as long as we keep the source file in ES5.
Closes gh-2335
Ref mishoo/UglifyJS#5967
Ref jquery/download.jqueryui.com#629
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 334e4bb1a..cc532b6e9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,9 +51,6 @@ const cssFiles = [ // minified files const minify = { - options: { - preserveComments: false - }, main: { options: { banner: createBanner( uiFiles ) @@ -174,7 +171,7 @@ grunt.initConfig( { } }, - uglify: minify, + minify, htmllint: { good: { options: { @@ -403,9 +400,9 @@ grunt.registerTask( "lint", [ "csslint", "htmllint" ] ); -grunt.registerTask( "build", [ "requirejs", "concat" ] ); +grunt.registerTask( "build", [ "requirejs", "concat", "minify:main" ] ); grunt.registerTask( "default", [ "lint", "build" ] ); -grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ] ); -grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ] ); +grunt.registerTask( "sizer", [ "requirejs:js", "minify:main", "compare_size:all" ] ); +grunt.registerTask( "sizer_all", [ "requirejs:js", "minify", "compare_size" ] ); }; |