I've only read about it in passing, so further investigation would be required. That one could be a better or worse option, depending on your environment. There is also a tool from Microsoft, the name escapes me at the moment but that apparently delivers similar results to CC. YUI Compressor is another option(from Yahoo) but it doesn't reduce the file size as much as CC does. You can see more about this on the Getting Started with the Closure Compiler Application It also does some simple code changes that basically amount to code clean up and micro optimizations. This tool lets you copy-paste your code and. ’cause uglify-js cannot consume es6+ syntax at all, and uglify-es have bugs. : It is a JavaScript-based minification tool. But before the terser-js came out, we’re figuring out a way to work with uglify-es and babel together. : It is a development tool that uses YUI Compressor CSS minification. However, this unminifying tool will only parse out the code based on the minified code. This unminification happens within your browser itself, so you don’t need to worry about a server going through your private or proprietary code. All you need to do is copy and paste your code and download the minified version as a file. It supports JavaScript (JS), CSS, HTML, XML, and JSON code. The SIMPLE_OPTIMIZATIONS mode is what I would recommend using, as it cleans whitespace/comments and munges(reduces) variables. : A simple to use tool that lets you minify CSS. This why only doing minify on your production JS is recommend, since if you have enough code to need to do packing or minify, you have enough code to make eval() choke the client during page load.įor a good minifier, I would look to using Google's Closure Compiler Side stepping the eval() is evil issues here, this can also create a large amount of overhead on the client during page load when you start packing larger JS libraries, like jQuery. Packer does more then just rename vars and arguments, it actually maps the source code using Base62 which then must be rebuilt on the client side via eval() in order to be usable. Should you deploy a packed or minified version in your web app?Įlse if (d.documentElement & d.documentElement.clientHeight) I was wondering what the differences/benefits of the packer vs the minifier were, i.e.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |