or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-5/

Task Execution Utility

A Node.js utility that executes specific tasks in an Nx workspace using programmatic APIs or CLI commands.

Capabilities

Execute single project task

Given a project name and target, the utility should execute that specific task in the workspace.

  • When given project "myapp" and target "build", it executes the build task for myapp @test
  • When given project "lib1" and target "test", it executes the test task for lib1 @test

Support configuration options

The utility should support passing configuration options to the task execution.

  • When executing with configuration "production", it applies production configuration @test
  • When executing without configuration, it uses default configuration @test

Handle task execution results

The utility should provide information about task execution results.

  • When task execution succeeds, it returns success status @test
  • When task execution fails, it returns failure status @test

Implementation

@generates

API

/**
 * Executes a single task for a specific project in an Nx workspace.
 *
 * @param {string} project - The name of the project
 * @param {string} target - The target to execute (e.g., 'build', 'test')
 * @param {Object} options - Optional configuration
 * @param {string} options.configuration - The configuration to use (e.g., 'production')
 * @returns {Promise<Object>} Execution result with success status
 */
async function executeTask(project, target, options = {}) {
  // IMPLEMENTATION HERE
}

module.exports = { executeTask };

Dependencies { .dependencies }

nx { .dependency }

Provides workspace task execution capabilities including the runExecutor function and target parsing utilities.

@satisfied-by