Hi ccdavies,
Here’s how I’d likely go about integrating with Head.js:
head.js("https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js") .js("//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js") .js("{exp:minimee js='/-/js/slideshow.js'}") .js("{exp:minimee js='/-/js/modernizr.js'}") .js("{exp:minimee js='/-/js/cookie.js'}") .js("{exp:minimee js='/-/js/selectivizr.js'}") .js("{exp:minimee js='/-/js/scripts.js'}");
Note that I’m not Minimee’ing jquery or jquery UI, since these are already serving from fast CDNs and there’s a good chance your site visitors already have these files cached in their browser.
Then the other scripts are each minified individually using an “API” syntax that I released with Minimee 2.x. You can read more about that and some examples on the Github docs page for Minimee (http://johndwells.github.com/Minimee/).
Before I go, I should mention one problem I’m seeing with how you’re using Minimee on your CSS - the IE-conditional CSS should not be included with your other CSS files, because Minimee will not see this conditional and lump them all in together. So I would simply break that into 2 Minimee tag pairs, like so:
{exp:minimee:css} <link rel="stylesheet" type="text/css" href="/-/css/cross-browser.less"> <link rel="stylesheet" type="text/css" href="/-/css/grid.less"> {/exp:minimee:css}
<!--[if lt IE 9]> {exp:minimee:css} <link rel="stylesheet" type="text/css" href="/-/css/grid-ie.css"> <link rel="stylesheet" type="text/css" href="/-/css/ie.css"> {/exp:minimee:css} <![endif]-->
Last, I notice you’re including LESS files in there - are you having a go with Minimee+LESS too? I’d be keen for any feedback, it’s still a bit of a beta. :)
Hope that helps!
Cheers,
John
|