[WIP] Fix #39: Generate correct source paths #40
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow
options.filename
to be a path to the intended output file (notjust the basename of it).
Set the
file
property of the source map to the basename ofoptions.filename
, or don’t set it at all ifoptions.filename
wasomitted.
Allow
options.sourcemap
to be a string: The path to the intendedlocation of the source map. If relative, it is relative to the current
working directory. (Only the dirname of
options.sourcemap
is used.)If
options.sourcemap
is set totrue
, assume that the source map isintended to either be placed next to
options.filename
, or be inlinedinto the CSS as a data uri, by using the dirname of
options.filename
or the current working directory if
options.filename
was omitted(instead of using the dirname of
options.sourcemap
as in the abovebullet point).
Make relative source paths relative to the source map directory before
adding them to the source map.
Make relative source paths from applied original maps relative to the
source map directory before adding them to the map.
TODO: Tests and docs.