cli
cli copied to clipboard
nx-plugin - export `createNodes` to have dynamic tasks
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
ifcode-pushup.config.ts
is present in root - equal to executenpx code-pushup
with nx defaults. - [ ] (nice to have) target
code-pushup--init
ifcode-pushup.config.ts
is NOT present in root - equal to executenpx 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