-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(CLI): support parallel option (#9)
* fix(CLI): support parallel option * chore: update dependencies
- Loading branch information
1 parent
74becbc
commit f32d20a
Showing
9 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#! /usr/bin/env node | ||
|
||
import { escapeRegExp } from '../modules/get-files.js'; | ||
import { getArg } from '../helpers/get-arg.js'; | ||
import { getArg, hasArg } from '../helpers/get-arg.js'; | ||
import { poku } from '../index.js'; | ||
|
||
const rawDirs = getArg('include'); | ||
const rawFilter = getArg('filter'); | ||
const rawExclude = getArg('exclude'); | ||
|
||
const dirs = rawDirs?.split(',') || []; | ||
const dirs = getArg('include')?.split(',') || []; | ||
const filter = getArg('filter'); | ||
const parallel = hasArg('parallel'); | ||
const exclude = getArg('exclude'); | ||
|
||
poku(dirs, { | ||
filter: rawFilter ? new RegExp(escapeRegExp(rawFilter)) : undefined, | ||
exclude: rawExclude ? new RegExp(escapeRegExp(rawExclude)) : undefined, | ||
filter: filter ? new RegExp(escapeRegExp(filter)) : undefined, | ||
exclude: exclude ? new RegExp(escapeRegExp(exclude)) : undefined, | ||
parallel, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.