Add possibility to filter coveragemaps#637
Conversation
By filtering the coveragemaps for certain files, using include and exclude, it is possible to gain some more control over the files being included in the report. Normally this is done when instrumenting the code, but it may be beneficial to create different reports and instrument the code only once.
|
Anybody know how I can recheck this PR in appveyor. It seems to report the wrong status. |
|
@schutm you can always just push an empty commit:
thanks for dusting this off. |
|
Changes Unknown when pulling 2fd8674 on schutm:master into ** on istanbuljs:master**. |
|
@schutm thanks for the contribution, sorry it took so long to land! I recently stood up a community slack here, to try to better coordinate work around the OSS projects Ive been managing: http://devtoolscommunity.herokuapp.com/ would love to have you join, and help prod me into getting a new release of nyc out the door. |
|
@schutm this is now released in |
As dicussed in istanbuljs/istanbuljs#24
I found some time to recreate the implementation of this using sourcemaps. The sourcemaps made it way easier and it looks nicer as well now!
To reiterate why I made this: I've a 'non-standard' setup, where I build my distribution-packages outside of the source folder. I do this because I write mainly ES6 code, and distribution-packages need to be plain old JavaScript. In addition because AVA is perfectly able to run ES6 tests, but not able to test ES6 modules I've to transpile my ES6 code (using rollup and babel/bublé) to plain JavaScript. The resulting transpiled file will also include all libraries being imported.
In addition you can use this feature to make more specific reports. Instrument once, and split your reporting over different folders, or outputs. E.g. in the mono-repo have a HTML-report per library.