istanbuljs / nyc

the Istanbul command line interface
https://istanbul.js.org/
ISC License
5.56k stars 356 forks source link

Using the nested structure in the summarizer #932

Open AmeCode opened 5 years ago

AmeCode commented 5 years ago

How can I change the Reporter to use the nested structure without changing code in node_modules/nyc/index.js file? Is there an argument to be passed with the nyc cli (e.g. --nested) or can I change options in .nycrc file or change package.json? Thanks in advance

JaKXz commented 5 years ago

@AmeCode sorry for the late reply - could you clarify your question, perhaps with an example? what code are you changing in nyc/index.js? If you're able to do that and consistently produce what you're looking for, perhaps a PR to demonstrate what you're talking about would be a good place to start.

AmeCode commented 5 years ago

@JaKXz thanks for the quick replay.

https://github.com/istanbuljs/nyc/blob/12b89867699ece711fd57561cb451fb3824dacdd/index.js#L451

tree = libReport.summarizers.nested(map)

is there a way to change it from the nyc console like adding a --nested or something without the need to change the code

JaKXz commented 5 years ago

@AmeCode I'm not quite sure I understand what you mean... are you using the text reporter?

coreyfarrell commented 5 years ago

I'm planning some related changes to the istanbul-lib-report / istanbul-reports API's for nyc@15. The primary goal of this will be to allow the report to request a specific summarizer rather than having nyc give it one. I will keep this request in mind as I'm working on that feature.

AmeCode commented 5 years ago

@coreyfarrell thanks

ghost commented 3 years ago

There is any update on this?