docs: add missing description for --exclude-after-remap#413
Conversation
bcoe
left a comment
There was a problem hiding this comment.
Thanks for the contribution 👏
I left some suggestions about how we might better explain the difference between inline vs., on disk source maps, and the setting --exclude-after-remap.
README.md
Outdated
| transpiler like [`@babel/register`]) c8 supports both inline source-maps and | ||
| `.map` files. | ||
|
|
||
| _Important: If you are using c8 with a project that pre-instruments its code, |
There was a problem hiding this comment.
It would be useful to give an example of when we would want to set --exclude-after-remap to true, vs, when we would want to leave it false, rather than this blurb.
README.md
Outdated
| and `--exclude` flag checks, will be loaded into the report. If any of those files remain uncovered they will be factored | ||
| into the report with a default of 0% coverage. | ||
|
|
||
| ## Source-Map support for pre-instrumented codebases |
There was a problem hiding this comment.
Perhaps instead:
Pre-instrumented vs., just-in-time instrumented codebases
Source map files, vs., inline source maps
Just-in-time instrumented codebases will often insert source maps inline with the .js code they generate at runtime (_as an example, @babel-register/register can be configured to insert a source map foote).
Pre-instrumented codebases, e.g., running tsc to generate .js in a build folder, may generate either inline source maps, or a separate .map file stored on disk.
c8 can handle loading both types of source maps.
Exclude after remap
... explain here why you when you would set the setting to true, vs., false.
|
@bcoe Thanks for suggestions and review 😀. Update the explanations and be willing to make some other changes if it is required. |
bcoe
left a comment
There was a problem hiding this comment.
Left a couple more editing suggestions, does this get at what you were picturing?
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
|
@ArrayZoneYour thank you for the contribution. |
Reference:
https://github.com/istanbuljs/nyc#source-map-support-for-pre-instrumented-codebases
#293
Checklist