Preconditions
User story
As a Nx user I want to have my CodePushup targets set up automatically in standalone mode.
Acceptance criteria
Implementation details
nx.json
packages/utils/project.json
Run examples:
nx run myproj:code-pushup → autorun
nx run myproj:code-pushup:collect-eslint → collect eslint only
nx run myproj:code-pushup:collect-eslint-cached → for plugin caching setup
nx run myproj:code-pushup:upload
Preconditions
User story
As a Nx user I want to have my CodePushup targets set up automatically in standalone mode.
Acceptance criteria
Implementation details
nx.json
{ "plugins": [ { "plugin": "@code-pushup/nx-plugin", "options": { "targetName": "cp", "projectPrefix": "cli", } } ] }packages/utils/project.json
{ "targets": { "code-pushup": { "executor": "@code-pushup/nx-plugin:cli", "cache": true, "inputs": ["default", "code-pushup-inputs"], "outputs": ["{projectRoot}/.code-pushup/**/*"], "options": { "bin": "node ./packages/cli/src/index.ts", "config": "{projectRoot}/code-pushup.config.ts", "progress": false, "verbose": true, "persist": { "outputDir": "{projectRoot}/.code-pushup" } }, "configurations": { "autorun": { "command": "autorun" }, "print-config": { "command": "print-config", "output": "{projectRoot}/.code-pushup/code-pushup-config.json" }, "collect": { "command": "collect", "cache": { "write": true } }, "upload": { "command": "upload", "upload": { "project": "cli-{projectName}" } }, /* per-plugin “collect” configs (distinct cache keys) */ "collect-eslint-cache": { "command": "collect", "onlyPlugins": ["eslint"], "cache": { "write": true }, "persist": { "skipReports": true } }, "collect-coverage-cache": { "command": "collect", "onlyPlugins": ["coverage"], "cache": { "write": true }, "persist": { "skipReports": true } }, "collect-typescript-cache": { "command": "collect", "onlyPlugins": ["typescript"], "cache": { "write": true }, "persist": { "skipReports": true } }, "collect-jsdocs-cache": { "command": "collect", "onlyPlugins": ["jsdocs"], "cache": { "write": true }, "persist": { "skipReports": true } }, "collect-lighthouse-cache": { "command": "collect", "onlyPlugins": ["lighthouse"], "cache": { "write": true }, "persist": { "skipReports": true } }, "collect-js-packages-cache":{ "command": "collect", "onlyPlugins": ["js-packages"] } }, "defaultConfiguration": "autorun" } } }Run examples:
nx run myproj:code-pushup→ autorunnx run myproj:code-pushup:collect-eslint→ collect eslint onlynx run myproj:code-pushup:collect-eslint-cached→ for plugin caching setupnx run myproj:code-pushup:upload