-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: Add cache...
options for instrument command
#9
base: master
Are you sure you want to change the base?
Conversation
index.js
Outdated
@@ -8,6 +8,7 @@ const nycCommands = { | |||
instrument: [null, 'instrument'], | |||
checkCoverage: [null, 'report', 'check-coverage'], | |||
report: [null, 'report'], | |||
cache: [null, 'instrument'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed as we can just use nycCommands.instrument
(see suggested code changes below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed up the recommended changes, but I'm still a little confused as to the purpose of the nycCommands
block at the top of the schema file. What does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It serves the same purpose as code such as const MAGIC_VALUE = 53;
. Instead of repeating [null, 'instrument']
for each option we reference nycCommands.instrument
. This module was created without much feedback so if you have suggestions for how to improve the code readability I'm 👍, but any such changes would need to be a separate PR.
Makes the 'cache' and 'cacheDir' options available for the instrument command
b9c28eb
to
41591d3
Compare
@AndrewFinlay thanks for the PR. I'm buried with $dayjob work currently, it'll take me some time to move forward with merging this. Once the matching nyc PR is fixed I will try setting aside time to take another look. |
No worries @coreyfarrell, that sounds good and I'm not in any particular rush. I'll try and progress it, take a look when you have some time. |
Makes the
cache
andcacheDir
options available for the instrument command.This change is a prerequisite to implementing this functionality in
nyc
. There will be a PR in thenyc
repo accompanying this PR.