Squish your CSS and JS files in your ASP.NET web apps
Join the DZone community and get the full member experience.Join For Free
The tool works perfectly fine in both ASP.NET WebForms and ASP.NET MVC and is available to get & install using NuGet package manager.
Open NuGet package manager or NuGet Manager PowerShell Console..
NuGet package manager:
As you can see, SquishIt is available for both ASP.NET and ASP.NET MVC.
NuGet PowerShell Console:
Now, lets add our CSS and JS files that we want to Squish.
Once you run your web, open source code and check the rendered CSS/JS files
Since SquishIt works based on the Debug setting in Web.config
<compilation debug="true" targetFramework="4.0"/>
change the debug setting to false and run the web again…
Now, if you open the source code in your browser, you will see two files for both, CSS and JS files squished!
You will see that SquishIt has created the new files in the respective folders
If we open the squished file, you will see it is minified
SquishIt works exactly the same way for ASP.NET MVC!
Published at DZone with permission of Hajan Selmani, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Design Patterns for Microservices: Ambassador, Anti-Corruption Layer, and Backends for Frontends
How To Check IP Addresses for Known Threats and Tor Exit Node Servers in Java
Mastering Time Series Analysis: Techniques, Models, and Strategies
Logging Best Practices Revisited [Video]