-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add missing description for --exclude-after-remap #413
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -53,6 +54,17 @@ By supplying `--all` to c8, all files in directories specified with `--src` (def | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple more editing suggestions, does this get at what you were picturing?
Co-authored-by: Benjamin E. Coe <[email protected]>
Co-authored-by: Benjamin E. Coe <[email protected]>
@ArrayZoneYour thank you for the contribution. |
Reference:
https://github.com/istanbuljs/nyc#source-map-support-for-pre-instrumented-codebases
#293
Checklist