nx/docs/generated/cli/run.md
Zachary DeRose 5e2bf07908
docs(core): fixing some references to old architect terminology (#16424)
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2023-04-27 08:28:53 -04:00

45 lines
1.1 KiB
Markdown

---
title: 'run - CLI command'
description: 'Runs a target defined for your project. Target definitions can be found in the `scripts` property of the project `package.json`, or in the `targets` property of the project `project.json` file.'
---
# run
Runs a target defined for your project. Target definitions can be found in the `scripts` property of the project `package.json`, or in the `targets` property of the project `project.json` file.
## Usage
```shell
nx run <target> [options]
```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.
### Examples
Run the `build` target for the `myapp` :
```shell
nx run myapp:build
```
Run the `build` target for the `myapp` project with a `production` configuration:
```shell
nx run myapp:build:production
```
## Options
### configuration (-c)
A named builder configuration, defined in the "configurations" section of the workspace configuration file. The builder uses the named configuration to run the given target.
### help
Show help
### version
Show version number