ASP.NET MVC Razor CSS and Javascript Compress and Manager

יום שני, אוגוסט 8, 2011

Hi, If you are ASP.NET MVC Razor developer and you are looking for a nice solution to Combine, Compress and Manage your CSS and JavaScript files, Well SquishIt can fit your needs. Razor Code Sample: @MvcHtmlString.Create(  SquishIt.Framework.Bundle.Css()    .Add("~/media/css/reset.css")    .Add("~/media/css/style.less")    .Add("~/media/css/handheld.css")    .Render("~/media/css/combined_#.css"))@MvcHtmlString.Create(  SquishIt.Framework.Bundle.JavaScript()    .Add("~/media/js/geo.js")    .Add("~/media/js/jquery-1.4.4.js")    .Add("~/media/js/jquery.unobtrusive-ajax.js")    .Add("~/media/js/jquery.validate.js")    .Add("~/media/js/jquery.validate.unobtrusive.js")    .Render("~/media/js/combined_#.js")) Output looks like this:<link rel="stylesheet" type="text/css" href="/media/css/combined_312454.css" /><script type="text/javascript" href="/media/js/combined_312454.js"></script> You can read more here. We are using SquishIt on the company I work and it look like a really nice and useful solution. I hope you will find it useful on your company or project also :-) Yours, Rotem

Compress and Consolidation of JavaScript and CSS files for .NET

יום ראשון, אוקטובר 12, 2008

Hi, There is cool open source project in codeplex called: Javascript and CSS Consolidation for ASP.NET that give infrastructure for compress and consolidation JS and CSS files for ASP.NET application. Project Description A library for ASP.NET that provides an easy way to consolidate external javascript and css files. The primary goals for this project are:* Make the development environment mirror production as much as possible (e.g. files should be consolidated in all environments including the local dev box)* Allow the developer to organize their scripts and styles in as many files as they please without compromising on performance* Make the process seemless for...