We should be able to get the source filename information from the AST, which should allow us to drop the dir parameter (simply using the directory of the file specified by position.source in the AST nodes). The source information is added by css-parse when position tracking is enabled (will default to on in the upcoming v2).
The source filename from the AST could be resolved to the root parameter. I think this would make the most sense, although we could always resolve to current directory and then make all source map filenames relative to root. Any preferences?
We should be able to get the
source
filename information from the AST, which should allow us to drop thedir
parameter (simply using the directory of the file specified byposition.source
in the AST nodes). Thesource
information is added bycss-parse
when position tracking is enabled (will default to on in the upcoming v2).The
source
filename from the AST could be resolved to theroot
parameter. I think this would make the most sense, although we could always resolve to current directory and then make all source map filenames relative toroot
. Any preferences?