gdsmith / jquery.easing

jQuery Easing Plugin
http://gsgd.co.uk/sandbox/jquery/easing
Other
922 stars 422 forks source link

Minified file can be smaller #24

Closed clarmso closed 7 years ago

clarmso commented 7 years ago

Google page speed has flagged that jquery.easing.min.js can be smaller. The current minified file is 2.5k. The file has been taken from cdn.js (https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js).

After running uglify on my local copy of jquery.easing.js using the "mangle" option, Google page speed no longer flags jquery.easing.min.js. The result minified file is 2.2k. (I know. It's not a huge difference.) To be specific, the exact "npm run" command to generate the minified file is the following: npm run uglify -- --compress --mangle