Skip to content

add command line options to control compacting and comment removal - #754

Merged
bcoe merged 2 commits into
istanbuljs:masterfrom
karottenreibe:master
Jan 15, 2018
Merged

add command line options to control compacting and comment removal#754
bcoe merged 2 commits into
istanbuljs:masterfrom
karottenreibe:master

Conversation

@karottenreibe

Copy link
Copy Markdown
Contributor
  • there is no noCompact option in istanbul, only a compact option. fixed its usage
  • add --[no-]compact and --[no-]preserve-comments and pass them on to
    istanbul

I wasn't 100% sure what the default for preserveComments should be. Reading the code, it seemed to me that the intention was to have comments stripped by default but the current behaviour is to not strip comments, so I stuck with the current behaviour in order to keep the users' setups the same.

Please note that due to a bug in istanbul-lib-instrument, the preserveComments option set to false doesn't do anything yet. I filed another pull request with a fix for that as well: istanbuljs/istanbuljs#122

I hope the changes are OK, please let me know if not :-)

- there is no noCompact option in istanbul, only a compact option
- add --[no-]compact and --[no-]preserve-comments and pass them on to
  istanbul
@karottenreibe

Copy link
Copy Markdown
Contributor Author

sorry about the test failures, I'm looking into them

@bcoe

bcoe commented Dec 31, 2017

Copy link
Copy Markdown
Member

@karottenreibe 👋 thanks for the contribution -- have had a hectic end of 2017, and haven't been the world's best at landing patches.

but, patches are always greatly appreciated! feel free to join our community slack if you ever want to prod me and help move things along: http://devtoolscommunity.herokuapp.com/

I will work on getting this landed soon.

@bcoe bcoe added the triaged label Dec 31, 2017
@bcoe
bcoe merged commit 2030e0c into istanbuljs:master Jan 15, 2018
@bcoe

bcoe commented Feb 13, 2018

Copy link
Copy Markdown
Member

@karottenreibe please try npm i nyc@next, which should have your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants