Using yepnope.js with less.js
// See:
//
// - http://yepnopejs.com/
// - http://lesscss.org/
yepnope({
test: false,
nope: [
'preload!stylesheets/test.less',
],
callback: {
'test.less': function(url, testResult, index){
// Add the less stylesheet link to the head
$('<link />').attr({
rel: 'stylesheet/less',
type: 'text/css',
href: url
}).appendTo('head');
// Load and execute less.js to get the styelsheets working
yepnope('javascripts/less.js')
},
}
});