This repository was archived by the owner on Jan 9, 2019. It is now read-only.
This repository was archived by the owner on Jan 9, 2019. It is now read-only.
Description
I created a simple LessCss filter for webutilities: http://code.google.com/p/webutilities/issues/detail?id=46 but unfortunately, when using LessCompiler.compile(String data) @imports don't work.
When a relative path is specified, I see this error:
org.lesscss.LessException: Couldn't load undefinedvariables.less (0)
That's understandable, obviously the import doesn't know where the path is relative from
However changing '@ import' to the full path still doesn't work:
org.lesscss.LessException: Couldn't load file:///full/path/to/file/css/variables.less (undefined)
I think it comes from envjs returning a different status for file:/// paths than browsers, the xhs.status is undefined even though the file was loaded properly (was able to hack less.js to make it ignore the return status and it worked).
If this bug can be fixed, a great enhancement would be a new function in LessCompiler:
LessCompiler.compile(String data, URL basePath); so imports would more easily work when processing data in a servlet context like the filter does.
Reactions are currently unavailable
I created a simple LessCss filter for webutilities: http://code.google.com/p/webutilities/issues/detail?id=46 but unfortunately, when using LessCompiler.compile(String data) @imports don't work.
When a relative path is specified, I see this error:
org.lesscss.LessException: Couldn't load undefinedvariables.less (0)
That's understandable, obviously the import doesn't know where the path is relative from
However changing '@ import' to the full path still doesn't work:
org.lesscss.LessException: Couldn't load file:///full/path/to/file/css/variables.less (undefined)
I think it comes from envjs returning a different status for file:/// paths than browsers, the xhs.status is undefined even though the file was loaded properly (was able to hack less.js to make it ignore the return status and it worked).
If this bug can be fixed, a great enhancement would be a new function in LessCompiler:
LessCompiler.compile(String data, URL basePath); so imports would more easily work when processing data in a servlet context like the filter does.