tag:blogger.com,1999:blog-8389762629078434869.post384598441296109386..comments2024-03-05T06:52:40.648+00:00Comments on anthonydotnet: Dead-Simple Minification and Combination of CSS and JS filesAnthonyhttp://www.blogger.com/profile/18023903313258125606noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8389762629078434869.post-51650529794606225512014-01-13T08:15:26.098+00:002014-01-13T08:15:26.098+00:00GreatGreatAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-34871369620735220732013-04-02T14:25:59.008+01:002013-04-02T14:25:59.008+01:00Have been thinking about this...
ClientDependancy...Have been thinking about this...<br /><br />ClientDependancy - could quite easily be fixed, the only work that would need to be done, is to removed the regex minification and pass it across to the YUI DLL. (e.g. https://gist.github.com/uniquelau/5264736)<br /><br />I've worked through your MSBUILD example as above and started thinking for this to be useful for CSS it really needs to support ordering. This is my response in code ;)<br /><br />https://gist.github.com/uniquelau/5292108<br /><br />I've added support for essentially an XML file that contains the files to process. This file is relative to the JS/CSS directory so it gives a good split between your /Build idea, and then the /VisualStudioProject. If the _Minify.props is not available then all the files are process by default. As this is a MSBUILD file it's possible to also pass parameters into the YUI for EACH file, so if you wanted to leave comments on one file that would be easy :)<br /><br />I'd quite like to look to use a HTML Parser to automatically generate the manifest file, <br /><br />_<br /><br />In your code you've included Community Tasks, but I'm not sure you need this?<br /><br />Look forward to your next post :) LaurieLaurence Gillianhttp://www.voodoobytes.co.uk/noreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-84145301209977848242013-03-28T15:08:37.118+00:002013-03-28T15:08:37.118+00:00I've just tested this, how are you dealing wit...I've just tested this, how are you dealing with the order of each file?<br /><br />e.g. with css you would want to...<br /><br />reset.css<br />fonts.css<br />layout.css<br />carousel.css<br />etcLaurence Gillianhttp://www.voodoobytes.co.uk/noreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-26074111888652409492013-03-28T13:24:36.843+00:002013-03-28T13:24:36.843+00:00I think it's also worth noting Client Dependen...I think it's also worth noting Client Dependency will strip out @font-face and @media. Which breaks embedding fonts and responsive layouts.Laurence Gillianhttp://www.voodoobytes.co.uk/noreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-84041985704587653442013-01-05T16:03:21.707+00:002013-01-05T16:03:21.707+00:00Hey Justin, I know I already answered this over tw...Hey Justin, I know I already answered this over twitter, but I thought I'd answer here too in case other people have the same question...<br /><br />In my opinion it's a bit too "cody", especially for non-c# devs. Don't get me wrong... It's extremely powerful and flexible, and as a c# dev I like that. It basically comes down to personal taste about how you want your markup to look. <br /><br />We're still at a point where we have to use webforms some times and mvc other times. The webforms version of CD adds so much extra code to your aspx pages. Where, doing it my way you could just use an inline if statement. <br /><br />This was obviously much more of an issue when dealing with webforms. The razor version is obviously much cleaner:<br /><br />@Html<br />.RequiresCss("Content.css", "Styles") <br />.RequiresJs("/Js/jquery-1.3.2.min.js", 1)<br />.RequiresJs("FooterScript.js", "Scripts", 200);<br /><br />@Html.Raw(Html.RenderCssHere(new BasicPath("Styles", "/Css")))<br /><br /><br />But something like this may not be entirely obvious. And we also need to consider working with frontend devs and freelancers. They may find it confusing. <br /><br />But in 6 months I may change my mind :)<br /><br /><br />Anthonyhttps://www.blogger.com/profile/18023903313258125606noreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-51149488556778827882013-01-04T11:23:20.254+00:002013-01-04T11:23:20.254+00:00Any reason why you don't use Client Dependency...Any reason why you don't use Client Dependency?Anonymoushttps://www.blogger.com/profile/17406389864369562299noreply@blogger.com