From ebd3ac822baa71db1f553604ea3771c4187b4ac0 Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Thu, 31 Oct 2024 20:45:52 +0100 Subject: [PATCH 1/2] docs(shadcn-ui): Update README to correct nx command syntax Fixes #334 --- packages/shadcn-ui/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shadcn-ui/README.md b/packages/shadcn-ui/README.md index 5c17cb22..22bbf3d5 100644 --- a/packages/shadcn-ui/README.md +++ b/packages/shadcn-ui/README.md @@ -38,13 +38,13 @@ export const links: LinksFunction = () => [ ### Add ```sh -nx add button +nx add-component button ``` ### All all components ```sh -nx add +nx add-component ``` ## Updating the theme From c78d4e02aaa62d7d650b252dcf804b46dcd1ce35 Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Wed, 6 Nov 2024 17:00:46 +0100 Subject: [PATCH 2/2] feat(e2e-runner-run): Add skipTargets option to executor configuration Allows skipping target setup during execution by adding 'skipTargets' boolean option. --- .../e2e-runner/src/executors/run/run.impl.ts | 19 +++++++++++-------- .../e2e-runner/src/executors/run/schema.json | 8 +++++++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/e2e-runner/src/executors/run/run.impl.ts b/packages/e2e-runner/src/executors/run/run.impl.ts index 94ef8b85..098e1689 100644 --- a/packages/e2e-runner/src/executors/run/run.impl.ts +++ b/packages/e2e-runner/src/executors/run/run.impl.ts @@ -7,6 +7,7 @@ export interface RunOptions { runner: 'cypress' | 'playwright' | '@nx/playwright' | 'run-commands' runnerTarget?: string watch?: boolean + skipTargets?: boolean targets: NxTargetOptions[] } @@ -21,18 +22,20 @@ export async function endToEndRunner( options: RunOptions, context: ExecutorContext ): Promise<{ success: boolean }> { - const { runner, targets, ...rest } = options + const { runner, targets, skipTargets, ...rest } = options - runningTargets = targets.map((targetOptions) => new NxTarget(targetOptions)) + if (!skipTargets) { + runningTargets = targets.map((targetOptions) => new NxTarget(targetOptions)) - try { - // Start all targets - await Promise.all(runningTargets.map((nxTarget) => nxTarget.setup())) + try { + // Start all targets + await Promise.all(runningTargets.map((nxTarget) => nxTarget.setup())) - } catch { - await killTargets() + } catch { + await killTargets() - return { success: false } + return { success: false } + } } try { diff --git a/packages/e2e-runner/src/executors/run/schema.json b/packages/e2e-runner/src/executors/run/schema.json index d8d2d46a..2c8be7e5 100644 --- a/packages/e2e-runner/src/executors/run/schema.json +++ b/packages/e2e-runner/src/executors/run/schema.json @@ -5,6 +5,12 @@ "title": "Build executor", "description": "", "type": "object", - "properties": {}, + "properties": { + "skipTargets": { + "type": "boolean", + "description": "When `true` the provided targets will be skipped.", + "default": false + } + }, "required": [] }