* feat(core): add cwd option to commands runner * docs(core): add docs for new cwd option in commands runner * cleanup(core): remove unecesarry import in test * fix(core): fix failing unit test * feat(core): allow additionalProperties for run commands * docs(core): format docs for command runner
65 lines
1.2 KiB
Markdown
65 lines
1.2 KiB
Markdown
# run-commands
|
|
|
|
Run commands
|
|
|
|
Builder properties can be configured in workspace.json when defining the builder, or when invoking it.
|
|
Read more about how to use builders and the CLI here: https://nx.dev/react/guides/cli.
|
|
|
|
## Properties
|
|
|
|
### args
|
|
|
|
Type: `string`
|
|
|
|
Extra arguments. You can pass them as follows: ng run project:target --args='--wait=100'. You can them use {args.wait} syntax to interpolate them in the workspace config file.
|
|
|
|
### color
|
|
|
|
Default: `false`
|
|
|
|
Type: `boolean`
|
|
|
|
Use colors when showing output of command
|
|
|
|
### commands
|
|
|
|
Type: `array` of `object`
|
|
|
|
#### command
|
|
|
|
Type: `string`
|
|
|
|
Command to run in child process
|
|
|
|
### cwd
|
|
|
|
Type: `string`
|
|
|
|
Current working directory of the commands.
|
|
|
|
### envFile
|
|
|
|
Type: `string`
|
|
|
|
You may specify a custom .env file path if your file containing environment variables is located elsewhere.
|
|
|
|
### outputPath
|
|
|
|
Type: `string`
|
|
|
|
Tells Nx where the files will be created
|
|
|
|
### parallel
|
|
|
|
Default: `true`
|
|
|
|
Type: `boolean`
|
|
|
|
Run commands in parallel
|
|
|
|
### readyWhen
|
|
|
|
Type: `string`
|
|
|
|
String to appear in stdout or stderr that indicates that the task is done. This option can only be used when parallel is set to true. If not specified, the task is done when all the child processes complete.
|