-
Notifications
You must be signed in to change notification settings - Fork 79
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 --ignore property/flag #98
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #98 +/- ##
===========================================
- Coverage 94.65% 93.92% -0.73%
===========================================
Files 20 19 -1
Lines 486 477 -9
Branches 113 115 +2
===========================================
- Hits 460 448 -12
- Misses 26 29 +3
Continue to review full report at Codecov.
|
Why using |
No reason, wasn't aware of the glob options, I'll update accordingly. |
Nice. Also are you disposed to add tests cases for this feature? |
I'm playing around with some of my projects with destiny to see how it goes, I'll probably do it later. |
Great! No problem. |
Co-Authored-By: Anatole Lucet <[email protected]>
Co-Authored-By: Anatole Lucet <[email protected]>
Co-Authored-By: Anatole Lucet <[email protected]>
Hi @AnatoleLucet, just to let you know I haven't forgotten about the PR. |
No problem, there is no urgency
I'm not sure what you mean. |
yes, it doesn't work irrc, or something like that |
Hey @danielpza, so I've looked a bit deeper on how this feature could be implemented. Also, my requested change in while (args.length > 0) {
const arg = args.shift();
if (arg == null) break;
+ let nextOptionIdx = args.findIndex(x => x.startsWith("-"));
+ nextOptionIdx = nextOptionIdx === -1 ? args.length : nextOptionIdx;
switch (arg) {
case "-h":
case "--help":
cliConfig.help = true;
break;
case "-V":
case "--version":
cliConfig.version = true;
break;
case "-w":
case "--write":
cliConfig.write = true;
break;
case "-S":
case "--avoid-single-file":
cliConfig.avoidSingleFile = true;
break;
case "--ignore":
- const nextOptionIdx = args.findIndex(x => x.startsWith("-"));
-
cliConfig.ignore = [...(cliConfig.ignore ?? []), ...(args.splice(0, nextOptionIdx) ?? [])];
break;
default: {
if (fs.existsSync(arg) || glob.hasMagic(arg)) {
cliConfig.include = [...(cliConfig.include ?? []), arg];
}
}
} |
@danielpza would love to see this feature wrapped up, destiny is currently crawling my node_modules folder 🗡️ |
Well, I totally forgot about the PR, but I also kinda lost interest on it, you are free to pick up from where I left or just make a new one, that will probably be easier. I usually have a root folder |
Supports .gitignore style