911 B
911 B
run-commands
Generates a target to run any command in the terminal
Usage
nx generate run-commands ...
nx g run-command ... # same
By default, Nx will search for run-commands in the default collection provisioned in angular.json.
You can specify the collection explicitly as follows:
nx g @nrwl/workspace:run-commands ...
Show what will be generated without writing to disk:
nx g run-commands ... --dry-run
Examples
Add the printhello target to my-feature-lib:
nx g @nrwl/workspace:run-commands printhello --project my-feature-lib --command 'echo hello'
Options
command
Type: string
Command to run
cwd
Type: string
Current working directory of the command
name
Type: string
Target name
outputs
Type: string
Comma-separated list of output paths
project
Type: string
Project name