nx-run-tasks

Execute single, multiple, and affected tasks in an Nx workspace via the Nx CLI.

8.9k|947|Updated Feb 5, 2020
One-click install
npx skills add https://github.com/tsparticles/tsparticles --skill nx-run-tasks-tsparticles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-run-tasks
Source: https://github.com/tsparticles/tsparticles/tree/main/.cursor/skills/nx-run-tasks
Command: npx skills add https://github.com/tsparticles/tsparticles --skill nx-run-tasks-tsparticles

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the execution of development and build tasks within an Nx workspace, ensuring consistency and leveraging Nx's powerful task orchestration capabilities.

Core Features & Use Cases

  • Task Execution: Run single or multiple tasks across projects (e.g., build, test, lint).
  • Affected Commands: Efficiently run tasks only on projects impacted by recent code changes.
  • Use Case: When you need to build all applications in your monorepo after making changes to a shared library, use this Skill to run nx run-many -t build.

Quick Start

Use the nx-run-tasks skill to run the 'build' and 'test' tasks on all projects in the workspace.

Frequently Asked Questions about nx-run-tasks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run build and test tasks across multiple projects in an Nx monorepo?

To run build and test tasks across multiple projects in an Nx monorepo, use the command nx run-many -t build test. This executes specified tasks across all workspace projects efficiently.

How does Nx affected task execution work for monorepos?

Nx affected task execution analyzes recent code changes to run tasks only on impacted projects within a monorepo. This mechanism saves time by skipping unaffected projects during build, test, and lint operations.

Can I use Nx to lint only the projects affected by my recent changes?

Yes, you can use Nx to lint only affected projects by utilizing the affected command. This ensures linting runs exclusively on projects impacted by recent code changes rather than the entire workspace.

What is the best way to orchestrate development tasks in an Nx workspace?

The best way to orchestrate development tasks in an Nx workspace is using the Nx CLI to manage task execution and caching. It supports single task runs, multiple task runs, and affected task computations.

Do I need an existing Nx workspace to run tasks with this approach?

Yes, you need an existing Nx workspace environment to execute tasks using this method. The task runner relies on the Nx CLI and workspace configuration to manage build, test, lint, and serve operations.

Why use Nx affected commands instead of running tasks on all projects?

Nx affected commands should be used instead of running tasks on all projects to leverage caching and avoid redundant processing. This approach efficiently computes and executes tasks only for projects impacted by code changes.