Skip to content

Instantly share code, notes, and snippets.

@halles
Created April 23, 2012 23:26
Show Gist options
  • Save halles/2474516 to your computer and use it in GitHub Desktop.
Save halles/2474516 to your computer and use it in GitHub Desktop.
Force Less.js to recompile CSS at polling time (defaults to less.poll = 1500ms)
less.watch();
less.optimization = 0;
jQuery(document).ready(function(){
cache = null;
less.watchTimer = setInterval(function () {
if (less.watchMode) {
console.log('Forcing Compile');
less.refresh(true);
}
}, less.poll);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment