Skip to content

Commit 752a97e

Browse files
committed
refactor: wip
1 parent f947823 commit 752a97e

4 files changed

Lines changed: 59 additions & 126 deletions

File tree

nx.json

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@
126126
"inputs": ["default", "test-vitest-inputs"],
127127
"dependsOn": ["^build"]
128128
},
129-
"nxv-env-setup": {
130-
"cache": true
131-
},
132129
"nxv-pkg-install": {
133130
"parallelism": false
134131
},
@@ -140,6 +137,29 @@
140137
"watch": false
141138
}
142139
},
140+
"code-pushup": {
141+
"cache": false,
142+
"outputs": [
143+
"{projectRoot}/.code-pushup/report.md",
144+
"{projectRoot}/.code-pushup/report.json"
145+
],
146+
"executor": "nx:run-commands",
147+
"options": {
148+
"command": "node packages/cli/src/index.ts",
149+
"args": [
150+
"--no-progress",
151+
"--verbose",
152+
"--config={projectRoot}/code-pushup.config.ts",
153+
"--cache.read",
154+
"--persist.outputDir={projectRoot}/.code-pushup",
155+
"--upload.project=cli-{projectName}"
156+
],
157+
"env": {
158+
"NODE_OPTIONS": "--import tsx",
159+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
160+
}
161+
}
162+
},
143163
"code-pushup-coverage": {
144164
"cache": true,
145165
"inputs": ["default", "code-pushup-inputs"],
@@ -324,16 +344,6 @@
324344
"releaseTagPattern": "v{version}"
325345
},
326346
"plugins": [
327-
{
328-
"plugin": "@code-pushup/nx-plugin",
329-
"options": {
330-
"cliBin": "node ./packages/cli/src/index.ts",
331-
"env": {
332-
"NODE_OPTIONS": "--import=tsx",
333-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
334-
}
335-
}
336-
},
337347
{
338348
"plugin": "@push-based/nx-verdaccio",
339349
"options": {

package-lock.json

Lines changed: 0 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
{
2+
"name": "@code-pushup/cli-workspace",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"description": "A CLI to run all kinds of code quality measurements to align your team with company goals",
6+
"homepage": "https://code-pushup.dev",
7+
"bugs": {
8+
"url": "https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/code-pushup/cli.git"
13+
},
14+
"type": "module",
15+
"scripts": {
16+
"prepare": "husky install",
17+
"commit": "git-cz",
18+
"knip": "knip"
19+
},
20+
"private": true,
21+
"engines": {
22+
"node": ">=22.14"
23+
},
224
"dependencies": {
325
"@code-pushup/portal-client": "^0.16.0",
426
"@isaacs/cliui": "^8.0.2",
@@ -31,7 +53,6 @@
3153
"@actions/github": "^6.0.1",
3254
"@beaussan/nx-knip": "^0.0.5-15",
3355
"@code-pushup/eslint-config": "^0.14.2",
34-
"@code-pushup/nx-plugin": "https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1109",
3556
"@commitlint/cli": "^19.5.0",
3657
"@commitlint/config-conventional": "^19.5.0",
3758
"@commitlint/config-nx-scopes": "^19.5.0",
@@ -104,28 +125,6 @@
104125
"vitest": "1.3.1",
105126
"zod2md": "^0.2.4"
106127
},
107-
"name": "@code-pushup/cli-workspace",
108-
"version": "0.0.0",
109-
"license": "MIT",
110-
"description": "A CLI to run all kinds of code quality measurements to align your team with company goals",
111-
"homepage": "https://code-pushup.dev",
112-
"bugs": {
113-
"url": "https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug"
114-
},
115-
"repository": {
116-
"type": "git",
117-
"url": "git+https://github.com/code-pushup/cli.git"
118-
},
119-
"type": "module",
120-
"scripts": {
121-
"prepare": "husky install",
122-
"commit": "git-cz",
123-
"knip": "knip"
124-
},
125-
"private": true,
126-
"engines": {
127-
"node": ">=22.14"
128-
},
129128
"optionalDependencies": {
130129
"@esbuild/darwin-arm64": "^0.25.9",
131130
"@nx/nx-darwin-arm64": "^21.4.1",

project.json

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,6 @@
22
"name": "cli-workspace",
33
"$schema": "node_modules/nx/schemas/project-schema.json",
44
"targets": {
5-
"cp-local-cli": {
6-
"executor": "nx:run-commands",
7-
"options": {
8-
"command": "node packages/cli/src/index.ts",
9-
"args": ["--no-progress", "--verbose", "--onlyPlugins=js-packages"],
10-
"env": {
11-
"NODE_OPTIONS": "--import tsx",
12-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
13-
}
14-
}
15-
},
16-
"cp-local-executor-cpplugins": {
17-
"dependsOn": ["nx-plugin:build"],
18-
"executor": "./packages/nx-plugin/dist:cli",
19-
"options": {
20-
"verbose": true,
21-
"progress": false,
22-
"onlyPlugins": ["js-packages"],
23-
"env": {
24-
"NODE_OPTIONS": "--import tsx",
25-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
26-
}
27-
}
28-
},
29-
"cp-local-executor-cli-cpplugins": {
30-
"dependsOn": ["nx-plugin:build"],
31-
"executor": "./packages/nx-plugin/dist:cli",
32-
"options": {
33-
"bin": "node packages/cli/src/index.ts",
34-
"verbose": true,
35-
"progress": false,
36-
"onlyPlugins": ["js-packages"],
37-
"env": {
38-
"NODE_OPTIONS": "--import tsx",
39-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
40-
}
41-
}
42-
},
435
"code-pushup-js-packages": {},
446
"code-pushup-lighthouse": {},
457
"code-pushup-coverage": {
@@ -63,6 +25,19 @@
6325
]
6426
},
6527
"code-pushup-jsdocs": {},
66-
"code-pushup-typescript": {}
28+
"code-pushup-typescript": {},
29+
"code-pushup": {
30+
"dependsOn": ["code-pushup-*"],
31+
"executor": "nx:run-commands",
32+
"options": {
33+
"args": [
34+
"--no-progress",
35+
"--verbose",
36+
"--cache.read",
37+
"--persist.outputDir={projectRoot}/.code-pushup",
38+
"--upload.project={projectName}"
39+
]
40+
}
41+
}
6742
}
6843
}

0 commit comments

Comments
 (0)