asual / lesscss-engine

LESS Engine - A Java wrapper for less.js
http://www.asual.com/lesscss
Apache License 2.0
220 stars 66 forks source link

import from a subdirectory #40

Open igal-getrailo opened 11 years ago

igal-getrailo commented 11 years ago

for the sake of code maintenance I've placed all of the bootstrap less files in a subfolder named bootstrap and I am trying to @import it from the parent folder, like so:

@import "bootstrap/bootstrap.less";

but I get an error

com.asual.lesscss.LessException: Syntax Error: java.lang.IllegalArgumentException: protocol = http host = null (line -1, column -1) near at com.asual.lesscss.LessEngine.parseLessException(LessEngine.java:215):215 at com.asual.lesscss.LessEngine.compile(LessEngine.java:162):162 at com.asual.lesscss.LessEngine.compile(LessEngine.java:172):172 ...

if I specify the absolute path it works ok.

it looks like the default protocol for import is http and not file. is that the expected behavior? how can I specify a relative path in the @import ?

thank you.

asual commented 11 years ago

Can you please identify what you're doing differently from the unit test. Check the following: src/test/java/com/asual/lesscss/LessEngineTest.java src/test/resources/META-INF/less/import-from-subdir.less

lmajano commented 10 years ago

I have the same issues. Anytime you use a relative path from a less file it does not find it.

lmajano commented 10 years ago

Please note that the input files are outside of the classpath