From ad2cbcae8e914ad73a649f2d9f87256b9b7fa10b Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Sep 2024 03:18:12 +0300 Subject: [PATCH] fix pretarget example --- e2e-examples/cli-e2e-pretarget/project.json | 7 +++++++ .../cli-e2e-pretarget/test/cli-command-sort.spec.ts | 2 +- e2e-examples/cli-e2e-pretarget/tooling/pretarget.plugin.ts | 3 --- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e-examples/cli-e2e-pretarget/project.json b/e2e-examples/cli-e2e-pretarget/project.json index 331b4b2e..fbe76cd2 100644 --- a/e2e-examples/cli-e2e-pretarget/project.json +++ b/e2e-examples/cli-e2e-pretarget/project.json @@ -8,6 +8,13 @@ "targets": { "lint": {}, "pretarget-e2e": { + "dependsOn": [ + { + "projects": "self", + "target": "pretarget-setup-env", + "params": "forward" + } + ], "executor": "@nx/vite:test", "inputs": ["default", "^production"], "outputs": ["{options.reportsDirectory}"], diff --git a/e2e-examples/cli-e2e-pretarget/test/cli-command-sort.spec.ts b/e2e-examples/cli-e2e-pretarget/test/cli-command-sort.spec.ts index a777454d..fbd337ef 100644 --- a/e2e-examples/cli-e2e-pretarget/test/cli-command-sort.spec.ts +++ b/e2e-examples/cli-e2e-pretarget/test/cli-command-sort.spec.ts @@ -4,7 +4,7 @@ import { mkdir, readFile, rm, writeFile } from 'node:fs/promises'; import { executeProcess, objectToCliArgs } from '@org/test-utils'; describe('CLI command - sort', () => { - const workspaceRoot = join('tmp', 'npm-env', 'cli-e2e-pretarget'); + const workspaceRoot = join('tmp', 'environment', 'cli-e2e-pretarget'); const baseDir = join(workspaceRoot, '__test_env__', 'cli-command-sort'); afterEach(async () => { diff --git a/e2e-examples/cli-e2e-pretarget/tooling/pretarget.plugin.ts b/e2e-examples/cli-e2e-pretarget/tooling/pretarget.plugin.ts index 11988afa..3748ed75 100644 --- a/e2e-examples/cli-e2e-pretarget/tooling/pretarget.plugin.ts +++ b/e2e-examples/cli-e2e-pretarget/tooling/pretarget.plugin.ts @@ -93,9 +93,6 @@ function verdaccioTargets( }, }, 'pretarget-setup-env': { - cache: true, - inputs: ['default', '^production', '!{projectRoot}/**/*.md'], - outputs: [`{workspaceRoot}/${tmpEnv}/${projectName}/node_modules`], executor: 'nx:run-commands', options: { commands: [