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

Provide --complete-copy Option for Instrumentation as in Istanbul #678

Open
juancarlosfarah opened this issue Sep 20, 2017 · 1 comment
Open

Comments

@juancarlosfarah
Copy link

I used to run my instrumentation step with istanbul using something like this:

cross-env NODE_ENV=test istanbul instrument -i ./src/main/webapp/src -o ./src/main/webapp/instrumented --complete-copy

It basically instrumented all of the .js files, but also copied everything else, so that I could then build that folder and package it with my backend code (in this case a Java backend).

I'm trying to find a way to do it with nyc. When I run:

cross-env NODE_ENV=test nyc instrument ./src/main/webapp/src ./src/main/webapp/instrumented

That takes care of the files needing instrumentation, but I cannot get the --complete-copy behaviour present in istanbul.

I am currently doing the build with Webpack and babel-plugin-istanbul, which takes care of the problem for now, but it would be great if there was an equivalent using nyc instrument.

@bcoe
Copy link
Member

bcoe commented Nov 20, 2017

@juancarlosfarah this sounds like a great addition to functionality.

For anyone who happens to come across this issue, this seems like a great first contribution.

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

3 participants