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

support for --root option #542

Closed
borisovg opened this issue Mar 29, 2017 · 8 comments
Closed

support for --root option #542

borisovg opened this issue Mar 29, 2017 · 8 comments

Comments

@borisovg
Copy link

nyc doesn't seem to have support for --root option?

I keep all my test stuff in ./tests (including separate package.json and all coverage output) and run istanbul from this directory with --root ../ set.

@bcoe
Copy link
Member

bcoe commented Mar 30, 2017

@borisovg would definitely entertain adding this 👍

Speedy37 pushed a commit to Speedy37/nyc that referenced this issue Jun 30, 2017
@Speedy37
Copy link
Contributor

While implementing the --root option, I found that the NYC_CWD environment variable does almost exactly that (it still looks upwards for package.json).

Speedy37 pushed a commit to Speedy37/nyc that referenced this issue Jul 21, 2017
@bcoe bcoe added the triaged label Aug 1, 2017
@Rush
Copy link

Rush commented Aug 31, 2017

I'm trying to migrate from istanbul and I'm also missing this feature.

@borisovg
Copy link
Author

borisovg commented Oct 3, 2017

Closing since this was fixed by #620

@borisovg borisovg closed this as completed Oct 3, 2017
@Rush
Copy link

Rush commented Oct 3, 2017

@borisovg since it's closed does it mean it has been released?

@borisovg
Copy link
Author

borisovg commented Oct 3, 2017

@Rush I'm using nyc 11.2.1 and --cwd is listed in the help output (in the bug I linked to it was decided that it is sufficient replacement for --root). I tried it today with my code and it seems to work fine.

@bcoe
Copy link
Member

bcoe commented Oct 4, 2017

@Rush should be working, there are a few bugs being addressed however feel free to join the conversation here:

#668

we seem to still have some issues when source-maps are remapping the directory structure.

@Rush
Copy link

Rush commented Nov 3, 2017

I confirm the option itself is working but unfortunately it's useless to me without ability to provide a custom coverage dir for lcov. Istanbul has an option --dir custom-coverage-dir, for example --dir coverage/api

Oh, never mind, there's --report-dir

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

No branches or pull requests

4 participants