You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Generate` action allows you to choose a generator and then opens a form listing out all the options for that generator. As you make changes to the form, the generator is executed in `--dry-run` mode in a terminal so you can preview the results of running the generator in real time.
6
+
7
+
[See the Demo](https://youtu.be/-nUr66MWRiE)
8
+
9
+
10
+
11
+
## From the Command Palette
12
+
13
+
You can also launch the `Generate` action from the Command Palette (`⇧⌘P`) by selecting `nx: generate (ui)`.
14
+
15
+
[See the Demo](https://youtu.be/Sk2XjFwF8Zo)
16
+
17
+
You can even construct the generator options while staying entirely within the Command Palette. Use `⇧⌘P` to open the Command Palette, then select `nx: generate`. After choosing a generator, select any of the listed options to modify the generator command. When you're satisfied with the constructed command, choose the `Execute` command at the top of the list.
The `Run` action allows you to choose an executor command and then opens a form listing out all the options for that builder. The frequently used executor commands `build`, `serve`, `test`, `e2e` and `lint` also have their own dedicated actions.
6
+
7
+
[See the Demo](https://youtu.be/rNImFxo9gYs)
8
+
9
+
10
+
11
+
## From the Command Palette
12
+
13
+
You can also construct the executor command options while staying entirely within the Command Palette. Use `⇧⌘P` to open the Command Palette, then select `nx: test`. After choosing a project, select any of the listed options to modify the executor command options. When you're satisfied with the constructed command, choose the `Execute` command at the top of the list.
- Clicking on the name of any project will navigate to that project's definition in the `workspace.json` (or `angular.json`) file. Clicking on the name of any builder command will navigate to that builder command's definition in the `workspace.json` (or `angular.json`) file.
6
+
7
+
- Clicking the  Refresh icon next to the `PROJECTS` header will repopulate the Projects pane from the `workspace.json` (or `angular.json`) file.
8
+
9
+
- Clicking the  Folder icon next to a project will reveal that project's folder in the VSCode Explorer pane.
10
+
11
+
- Clicking the  Execute icon next to an executor command will execute that command without prompting for options.
If you find yourself running the same command many times, here are few tips to save yourself some key strokes.
6
+
7
+
## Rerun Last Task
8
+
9
+
If you want to rerun the last task with all the same options specified, bring up the Command Palette (`⇧⌘P`) and choose `Rerun Last Task`.
10
+
11
+
12
+
13
+
## Keyboard Shortcuts
14
+
15
+
You can also set up custom tasks and assign keyboard shortcuts to them. In .vscode/tasks.json add a task like this:
16
+
17
+
```json
18
+
{
19
+
"label": "Test Affected",
20
+
"type": "shell",
21
+
"command": "nx affected --target=test"
22
+
}
23
+
```
24
+
25
+
Then from the Command Palette (`⇧⌘P`) choose `Preferences: Open Keyboard Shortcuts (JSON)`. Then add the following shortcut:
26
+
27
+
```json
28
+
{
29
+
"key": "ctrl+cmd+t",
30
+
"command": "workbench.action.tasks.runTask",
31
+
"args": "Test Affected"
32
+
}
33
+
```
34
+
35
+
Now, pressing `^⌘T` will run `nx affected --target=test`.
36
+
37
+
38
+
39
+
Here is more information on [VSCode tasks](https://code.visualstudio.com/docs/editor/tasks) and [keyboard shortcuts](https://code.visualstudio.com/docs/getstarted/keybindings).
`Acidic Workspace could not use "${workspacePath}" as a workspace root directory; however, parent folder "${workspaceRoot}" was successfully use to initialize.`
@@ -256,8 +254,6 @@ async function loadWorkspaceRoot(workspacePath: string): Promise<boolean> {
256
254
}else{
257
255
window.showErrorMessage(`Unable to load workspace from ${workspacePath}`);
0 commit comments