What do you use to minimize and compress JavaScript libraries?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
UglifyJS is a new one.
More information can be found here: http://badassjs.com/post/971960912/uglifyjs-a-fast-new-javascript-compressor-for-node-js
http://caja.appspot.com/tools/index does all three of HTML/CSS/JS.
There is a very good online compressor:
http://javascriptcompressor.com/
You can also shrink variables, if you want even more compresed.
Hope it helps
Google's closure tools
You can map the minified version to the regular source code for debugging in Firebug with their add-on.
Here is an article which described how to use YUI Compressor for minimizing files during build: Compressing JS files as part of your build process
Here's a solution from Microsoft that you can integrate into Visual Studio to minify the files automatically when you build your project.
To Install:
Download the msi from : http://aspnet.codeplex.com/releases/view/40584
You may need to restart your computer after its finished.
To Use:
Edit your .csproj file and include the following at the end of the file (but before the
</Project>
tag):Now when you build your project, all CSS and js files that don't end in .min.js, .min.css will be minified (See the "Exclude" attribute to exclude other files from being minified).