-> 0.5: Only create sourcemaps for concatenation, add tests, etc #8
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.
@IvanSanchez I started looking into Rich-Harris/sorcery#68 and ended up in a bit of a rabbit hole – bear with me:
AFAICT, as of #1 gobble-concat processes the sourcemaps of its sources – is that right? When I tried to build Leaflet.VectorGrid, it fell apart because one of the sources had an inline data URI for the sourceMappingURL, which wasn't expected.
Anyway, processing incoming sourcemaps is a bit unusual – in theory a transformer should only worry about creating a sourcemap for its own transformation, and let Gobble flatten everything as a final step. To that end, this PR reverts 1aaa1f6 and generates fresh sourcemaps for all
.js
and.css
files (unlessoptions.sourceMap === false
), ignoring existing sourcemaps other than to remove thesourceMappingURL
comments.It does a couple of other things besides (I should have been a bit more disciplined and done this as several PRs, but like I said, rabbit hole...) – it adds some tests and a build process.
What do you reckon?