Skip to content
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

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

Merged
merged 2 commits into from
Jan 15, 2018

Conversation

karottenreibe
Copy link
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
Contributor Author

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

@bcoe
Copy link
Member

bcoe commented Dec 31, 2017

@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
Copy link
Member

bcoe commented Feb 13, 2018

@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