alex-seville / grunt-blanket

grunt task to instrument files for code coverage using Blanket.js
http://blanketjs.org
MIT License
29 stars 6 forks source link

Unexpected Folder Structure of Instrumented Files #3

Closed marcusellis05 closed 11 years ago

marcusellis05 commented 11 years ago

Not sure this is an issue outright or unexpected behavior on my part.

My node files are grouped into folders for controllers, routes, models, etc. The folder structure looks something like this:

lib/

When I run the Grunt task, I expect to see a new folder "lib-cov" with the same list of folders underneath it. Instead I get:

lib-cov/

Is this the correct behavior? Seems that the additional depth is unnecessary and I'm wondering if I've done something wrong. My task config looks like this:

blanket: {
  instrument: {
    files: {
      'lib-cov/': ['lib/**/*.js']
    }
  }
}

Thanks.

alex-seville commented 11 years ago

Your understanding is correct. This is a flaw I haven't yet corrected. Sorry, I expect to fix it this week.

marcusellis05 commented 11 years ago

No worries. I've got a workaround in place in the meantime. Thanks.

alex-seville commented 11 years ago

Fixed. The syntax in the gruntfile has changed though. You only need to specify the directory.

blanket: {
  instrument: {
    files: {
      'lib-cov/': ['lib/']
    }
  }
}

.js files will automatically be detected and parsed.