
17

GitHub - makeflow/run-in-every: Run commands in every target projects/directorie...
source link: https://github.com/makeflow/run-in-every
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Run in Every
A simple command line utility for running commands in specific projects or directories.
Installation
yarn add --dev run-in-every
Usage
run-in-every [target-name] [...options] -- command [...args]
For example:
run-in-every eslint-project --echo --parallel -- eslint --config {configFileName} .
Common Options
--bail
(-b
) exit immediately upon failure.--quiet
(-q
) silence user command output.--echo
(-e
) echo run-in-every output.--parallel
(-p
) run commands in parallel.--concurrency <number>
concurrency for parallel mode.
Supported Targets
ESLint Project
Target name eslint-project
, alias eslint
.
options
--nested
include nested-projects.
variables
configFileName
file name of the matched config file (Path.basename()
).
TSLint Project
Target name tslint-project
, alias tslint
.
options
--nested
include nested-projects.
variables
configFileName
file name of the matched config file (Path.basename()
).
TypeScript Project
Target name ts-project
, alias ts
.
run-in-every ts-project -- tsc
options
--include-variant <pattern>
include varianttsconfig.<pattern>.json
.--only-variant <pattern>
only varianttsconfig.<pattern>.json
.--include-composite
include composite projects (extends
is not handled).--only-composite
match only composite projects (extends
is not handled).
variables
configFileName
file name of the matched config file (Path.basename()
).
Directory
Target name directory
.
options
--pattern <string>
glob pattern of directory name.
variables
dirName
directory name of the matched directory (Path.basename()
).
Directory with File
Target name directory-with-file
.
E.g.:
run-in-every directory-with-file --pattern package.json --data script.build -- pwd run-in-every directory-with-file --pattern config.json --data 'host: "localhost"' -- pwd
options
--pattern <string>
glob pattern of file to match.--data <string>
data pattern of file to match, format:<key>[:<value>][,...]
, e.g.:'name: "run-in-every", version: "0.1.0"'
.<key>
:- Plain string will be split as path keys, e.g.
scripts.build
. - JSON string array will be directly treated as path keys, e.g.
["scripts", "build"]
.
- Plain string will be split as path keys, e.g.
<value>
: JSON value to be compared with_.isEqual
.- If
<value>
is absent, it tests whether the path exists.
variables
fileName
file name of the matched file (Path.basename()
).
License
MIT License.
</article
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK