Add option to generate sourcemaps #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sourcemap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Instead of assuming the source map for a file is the same as the name of file with a .map extension, a more general approach would be to scan the code for sourceMapping comment to extract the sourcemap file, for eg using ( source-map-resolve). I went with the current approach as it is simple and performant and seems to work perfectly fine for this case
(Nit pick: please put a space after the type declaration colon.)
Could you make the last argument an options object, with
generateSourceMapbeing the only option right now? That way the function signature doesn't become a mess if we ever add more options.This could also take an options object as third argument. And please put spaces after commas and around operators.
Looks good—I've added some small style comments.
I have made changes based on the feedback from the review.
Merged and released as 0.1.14