From 093ccdf5608c1bef62b1416f215d34ef4af99559 Mon Sep 17 00:00:00 2001 From: Christian Liebel Date: Mon, 7 Oct 2024 14:58:25 -0400 Subject: [PATCH] Lab #17 --- tools/my-plugin/src/executors/echo/executor.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/my-plugin/src/executors/echo/executor.ts b/tools/my-plugin/src/executors/echo/executor.ts index 68609d8..addef44 100644 --- a/tools/my-plugin/src/executors/echo/executor.ts +++ b/tools/my-plugin/src/executors/echo/executor.ts @@ -1,8 +1,19 @@ -import { PromiseExecutor } from '@nx/devkit'; +import { PromiseExecutor, runExecutor as run } from '@nx/devkit'; import { EchoExecutorSchema } from './schema'; -const runExecutor: PromiseExecutor = async (options) => { +const runExecutor: PromiseExecutor = async (options, context) => { console.log(options.value); + + const result = await run({ + target: 'build', + project: context.projectName, + configuration: 'production' + }, {}, context); + + for await (const res of result) { + if (!res.success) return res; + } + return { success: true, };