gruntjs/grunt-contrib-stylus — pull request #71 by jlowcs (2013-12-11 13:44:28+00:00)
Title: Fix: 'resolve url' not working as expected

I was using the "resolve url" option in the stylus task but couldn't make it work as expected.

Looking into the code, I couldn't find any bit of code calling the "resolver" function.

Calling "stylus --resolve-url main.styl" did work as expected.

So I had a look at the basic stylus script, found the line related to resolveURL, and applied it to the stylus task.

Here is the code snippet from the basic stylus script:

~~~javascript
function usePlugins(style) {
[...]
if (urlFunction) {
style.define('url', stylus.url(urlFunction));
} else if (resolveURL) {
style.define('url', stylus.resolver()); //here is the line that has been copied to the task
}
}
~~~