Skip to content

Instantly share code, notes, and snippets.

@jxson
Created April 26, 2011 01:46
Show Gist options
  • Save jxson/941653 to your computer and use it in GitHub Desktop.
Save jxson/941653 to your computer and use it in GitHub Desktop.
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')
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment