cli icon indicating copy to clipboard operation
cli copied to clipboard

nx-plugin - export `createNodes` to have dynamic tasks

Open BioPhoton opened this issue 10 months ago • 0 comments

User story

As a user of the nx-plugin I want to have dynamic targets to avoid setup and configuration cost. In Nx v17 they released the crystal API and this should be leveraged to generate the dynamic targets.

Acceptance criteria

  • [ ] export createNodes to be abel to register the plugins like:
// nx.json
{
  "plugin": ["@code-pushup/nx-plugin"]
}

Add the following targets:

  • [ ] target code-pushup if code-pushup.config.ts is present in root - equal to execute npx code-pushup with nx defaults.
  • [ ] (nice to have) target code-pushup--init if code-pushup.config.ts is NOT present in root - equal to execute npx g @code-pushup/nx-plugin:init with nx defaults

Implementation details

  • init target - https://github.com/code-pushup/cli/tree/add-createNodes-init-target
  • autorun taget - https://github.com/code-pushup/cli/tree/add-createNodes-api-to-nx-plugin

BioPhoton avatar Apr 11 '24 18:04 BioPhoton