With great power comes great responsibility
Optimizing asset files
There are many services on the Internet that can help you minify your files. The biggest downside of using any of them is, that, unless you automate using them, you introduce additional effort and another point of failure to your development and deployment process. And this is exactly where Mavention SharePoint Assets Minifier can help you.
Mavention SharePoint Assets Minifier
Upon installation three new custom tools are made available for you to use:
- MaventionMinifiedCssFileGenerator, which minifies CSS files,
Right after you configure the custom tool, it will create a minified version of the asset file you configured it with.
The minified version will get updated every time you change and save the source file.
Choosing a naming convention
To provide you the maximal flexibility Mavention SharePoint Assets Minifier supports two naming conventions:
You choose for a specific naming convention by naming your files in a particular way. There is no separate setting that you have to maintain to choose which naming convention you would like to use.
How it works: the minification process
The Mavention SharePoint Assets Minifier uses the YUI Compressor for .Net Library available on CodePlex. At this moment the minification process is not configurable and set to the following values:
- MaventionMinifiedCssFileGenerator uses the MichaelAshRegexEnhancements compression mode with removing comments
- MaventionMinifiedJsFileGenerator uses the compression mode with optimzations and without obfuscation
- MaventionObfuscatedJsFileGenerator uses the compression mode with optimizations and obfuscation
About the tool
Mavention SharePoint Assets Minifier is a free Visual Studio 2010 extension that you can use in your development process without any restrictions. This is the first standalone release of this extension. You can expect the future versions to be releases as a part of the CKS:DEV toolkit.