Skip to content

Commit

Permalink
docs(nxdev): use shell marker for command-line (#13824)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes committed Dec 14, 2022
1 parent 2392b91 commit 315bf0c
Show file tree
Hide file tree
Showing 23 changed files with 92 additions and 92 deletions.
8 changes: 4 additions & 4 deletions docs/generated/cli/affected-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: 'Print applications affected by changes'

## Usage

```terminal
```shell
nx affected:apps
```

Expand All @@ -21,19 +21,19 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

Print the names of all the apps affected by changing the index.ts file:

```terminal
```shell
nx affected:apps --files=libs/mylib/src/index.ts
```

Print the names of all the apps affected by the changes between main and HEAD (e.g., PR):

```terminal
```shell
nx affected:apps --base=main --head=HEAD
```

Print the names of all the apps affected by the last commit on main:

```terminal
```shell
nx affected:apps --base=main~1 --head=main
```

Expand Down
14 changes: 7 additions & 7 deletions docs/generated/cli/affected-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Graph dependencies affected by changes

## Usage

```terminal
```shell
nx affected:graph
```

Expand All @@ -19,37 +19,37 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

Open the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file:

```terminal
```shell
nx affected:graph --files=libs/mylib/src/index.ts
```

Open the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR):

```terminal
```shell
nx affected:graph --base=main --head=HEAD
```

Save the project graph of the workspace in a json file, and highlight the projects affected by the changes between main and HEAD (e.g., PR):

```terminal
```shell
nx affected:graph --base=main --head=HEAD --file=output.json
```

Generate a static website with project graph data in an html file, highlighting the projects affected by the changes between main and HEAD (e.g., PR):

```terminal
```shell
nx affected:graph --base=main --head=HEAD --file=output.html
```

Open the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main:

```terminal
```shell
nx affected:graph --base=main~1 --head=main
```

Open the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two:

```terminal
```shell
nx affected:graph --exclude=project-one,project-two
```

Expand Down
8 changes: 4 additions & 4 deletions docs/generated/cli/affected-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: 'Print libraries affected by changes'

## Usage

```terminal
```shell
nx affected:libs
```

Expand All @@ -21,19 +21,19 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

Print the names of all the libs affected by changing the index.ts file:

```terminal
```shell
nx affected:libs --files=libs/mylib/src/index.ts
```

Print the names of all the libs affected by the changes between main and HEAD (e.g., PR):

```terminal
```shell
nx affected:libs --base=main --head=HEAD
```

Print the names of all the libs affected by the last commit on main:

```terminal
```shell
nx affected:libs --base=main~1 --head=main
```

Expand Down
16 changes: 8 additions & 8 deletions docs/generated/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Run target for affected projects

## Usage

```terminal
```shell
nx affected
```

Expand All @@ -19,43 +19,43 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

Run custom target for all affected projects:

```terminal
```shell
nx affected --target=custom-target
```

Run tests in parallel:

```terminal
```shell
nx affected --target=test --parallel=5
```

Run the test target for all projects:

```terminal
```shell
nx affected --target=test --all
```

Run tests for all the projects affected by changing the index.ts file:

```terminal
```shell
nx affected --target=test --files=libs/mylib/src/index.ts
```

Run tests for all the projects affected by the changes between main and HEAD (e.g., PR):

```terminal
```shell
nx affected --target=test --base=main --head=HEAD
```

Run tests for all the projects affected by the last commit on main:

```terminal
```shell
nx affected --target=test --base=main~1 --head=main
```

Use the currently executing project name in your command.:

```terminal
```shell
nx affected --target=build --tag=$NX_TARGET_TASK_PROJECT:latest
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Connect workspace to Nx Cloud

## Usage

```terminal
```shell
nx connect
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Prints information about the Nx Daemon process or starts a daemon process

## Usage

```terminal
```shell
nx daemon
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Executes any command as if it was a target on the project

## Usage

```terminal
```shell
nx exec
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/format-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Check for un-formatted files

## Usage

```terminal
```shell
nx format:check
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/format-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Overwrite un-formatted files

## Usage

```terminal
```shell
nx format:write
```

Expand Down
18 changes: 9 additions & 9 deletions docs/generated/cli/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Graph dependencies within workspace

## Usage

```terminal
```shell
nx graph
```

Expand All @@ -19,49 +19,49 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

Open the project graph of the workspace in the browser:

```terminal
```shell
nx graph
```

Save the project graph into a json file:

```terminal
```shell
nx graph --file=output.json
```

Generate a static website with project graph into an html file, accompanied by an asset folder called static:

```terminal
```shell
nx graph --file=output.html
```

Show the graph where every node is either an ancestor or a descendant of todos-feature-main:

```terminal
```shell
nx graph --focus=todos-feature-main
```

Include project-one and project-two in the project graph:

```terminal
```shell
nx graph --include=project-one,project-two
```

Exclude project-one and project-two from the project graph:

```terminal
```shell
nx graph --exclude=project-one,project-two
```

Show the graph where every node is either an ancestor or a descendant of todos-feature-main, but exclude project-one and project-two:

```terminal
```shell
nx graph --focus=todos-feature-main --exclude=project-one,project-two
```

Watch for changes to project graph and update in-browser:

```terminal
```shell
nx graph --watch
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Adds nx.json file and installs nx if not installed already

## Usage

```terminal
```shell
nx init
```

Expand Down
6 changes: 3 additions & 3 deletions docs/generated/cli/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Lists installed plugins, capabilities of installed plugins and other available p

## Usage

```terminal
```shell
nx list [plugin]
```

Expand All @@ -19,13 +19,13 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

List the plugins installed in the current workspace:

```terminal
```shell
nx list
```

List the generators and executors available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace):

```terminal
```shell
nx list @nrwl/web
```

Expand Down
16 changes: 8 additions & 8 deletions docs/generated/cli/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Creates a migrations file or runs migrations from the migrations file.

## Usage

```terminal
```shell
nx migrate [packageAndVersion]
```

Expand All @@ -25,43 +25,43 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

Update @nrwl/workspace to "next". This will update other packages and will generate migrations.json:

```terminal
```shell
nx migrate next
```

Update @nrwl/workspace to "9.0.0". This will update other packages and will generate migrations.json:

```terminal
```shell
nx migrate 9.0.0
```

Update @nrwl/workspace and generate the list of migrations starting with version 8.0.0 of @nrwl/workspace and @nrwl/node, regardless of what installed locally:

```terminal
```shell
nx migrate @nrwl/workspace@9.0.0 --from="@nrwl/workspace@8.0.0,@nrwl/node@8.0.0"
```

Update @nrwl/workspace to "9.0.0". If it tries to update @nrwl/react or @nrwl/angular, use version "9.0.1":

```terminal
```shell
nx migrate @nrwl/workspace@9.0.0 --to="@nrwl/react@9.0.1,@nrwl/angular@9.0.1"
```

Update another-package to "12.0.0". This will update other packages and will generate migrations.json file:

```terminal
```shell
nx migrate another-package@12.0.0
```

Run migrations from the provided migrations.json file. You can modify migrations.json and run this command many times:

```terminal
```shell
nx migrate --run-migrations=migrations.json
```

Create a dedicated commit for each successfully completed migration. You can customize the prefix used for each commit by additionally setting --commit-prefix="PREFIX_HERE ":

```terminal
```shell
nx migrate --run-migrations --create-commits
```

Expand Down
Loading

1 comment on commit 315bf0c

@vercel
Copy link

@vercel vercel bot commented on 315bf0c Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-dev-nrwl.vercel.app

Please sign in to comment.