Skip to content

Commit

Permalink
fixing less in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
moschel committed Jan 14, 2011
1 parent c873e49 commit 935f624
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions less/less.js
Expand Up @@ -71,10 +71,13 @@ steal({path: "less_engine.js",ignore: true},function(){
steal.dev.warn("steal/less : There's no content at "+path+", or you're on the filesystem and it's in another folder.");
return steal;
}
// less needs the full path with http:// or file://
var newPath = location.href.replace(/[\w\.-]+$/, '')+
path.replace(/[\w\.-]+$/, '');
//get and insert stype
new (less.Parser)({
optimization: less.optimization,
paths: [path.replace(/[\w\.-]+$/, '')]
paths: [newPath]
}).parse(src, function (e, root) {
var styles = root.toCSS(),
css = document.createElement('style');
Expand Down Expand Up @@ -118,4 +121,3 @@ steal({path: "less_engine.js",ignore: true},function(){
}
//@steal-remove-end
})

0 comments on commit 935f624

Please sign in to comment.