Permalink
Browse files

Support for relative @import in less files

I was playing with bootstrap and found that piler's less compiler
couldn't handle the @import "reset.less" in bootstrap.less. This fixes
the issue. It should not negatively impact any other less projects.
  • Loading branch information...
1 parent 783be41 commit 812725e78740b9d76203c5fe69b934f82860e757 @rdrey committed May 5, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/compilers.coffee
View
@@ -1,4 +1,5 @@
coffeescript = require "coffee-script"
+path = require "path"
try
stylus = require "stylus"
@@ -48,8 +49,9 @@ if stylus?
if less?
compilers.less =
render: (filename, code, cb) ->
- less.render code, cb
+ less.render code,
+ paths: [path.dirname filename]
+ cb
targetExt: "css"
-
module.exports = compilers

0 comments on commit 812725e

Please sign in to comment.