Closed necolas closed 10 years ago
When would this be useful? In rework-assets I used the position.source
property on the node to find where the file is. Rewriting the URL paths would make them not relative to the position.source
file.
I was looking at what https://github.com/bem/borschik does. But I see in rework-assets:
This means that even if the source document is parsed from several files (for example when using rework-npm), it will still resolve the referenced asset using the source file path.
So I guess this works as long as you stay within rework-land.
Thanks
It would be pretty easy to write a plugin to resolve the URLs using position.source
and then rewrite them relative to another directory.
This is probably over-simplified, but something like this…
components/a.css:
components/b.css:
both.css:
output (desired):