Skip to content

Commit f441b9a

Browse files
committed
chore: adjust models targets and workspace default targets
1 parent 54857b1 commit f441b9a

File tree

5 files changed

+47
-29
lines changed

5 files changed

+47
-29
lines changed

nx.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,28 @@
44
"build": {
55
"dependsOn": ["^build"],
66
"inputs": ["production", "^production"],
7-
"cache": true
7+
"cache": true,
8+
"executor": "@nx/js:tsc",
9+
"outputs": ["{options.outputPath}"],
10+
"options": {
11+
"outputPath": "{projectRoot}/dist",
12+
"main": "{projectRoot}/src/index.ts",
13+
"tsConfig": "{projectRoot}/tsconfig.lib.json",
14+
"assets": ["{projectRoot}/*.md"]
15+
}
816
},
917
"lint": {
1018
"inputs": ["default", "{workspaceRoot}/eslint.config.?(c)js"],
19+
"executor": "@nx/linter:eslint",
20+
"outputs": ["{options.outputFile}"],
21+
"cache": true,
1122
"options": {
12-
"maxWarnings": 0
13-
},
14-
"cache": true
23+
"maxWarnings": 0,
24+
"lintFilePatterns": [
25+
"{projectRoot}/**/*.ts",
26+
"{projectRoot}/package.json"
27+
]
28+
}
1529
},
1630
"e2e": {
1731
"dependsOn": ["^build"]

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"node": ">=22.14"
2323
},
2424
"dependencies": {
25+
"@code-pushup/models": "https://pkg.pr.new/code-pushup/cli/@code-pushup/models@54857b1",
2526
"@code-pushup/portal-client": "^0.14.3",
2627
"@isaacs/cliui": "^8.0.2",
2728
"@nx/devkit": "19.8.13",

packages/models/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"access": "public"
2727
},
2828
"type": "module",
29+
"files": [
30+
"dist",
31+
"!**/*.tsbuildinfo"
32+
],
2933
"dependencies": {
3034
"zod": "^4.0.5",
3135
"vscode-material-icons": "^0.1.0"

packages/models/project.json

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,21 @@
44
"sourceRoot": "packages/models/src",
55
"projectType": "library",
66
"targets": {
7-
"build": {
8-
"dependsOn": [{ "projects": "models-transformers", "target": "build" }],
9-
"executor": "@nx/js:tsc",
10-
"outputs": ["{options.outputPath}"],
11-
"options": {
12-
"outputPath": "dist/packages/models",
13-
"main": "packages/models/src/index.ts",
14-
"tsConfig": "packages/models/tsconfig.lib.json",
15-
"assets": ["packages/models/*.md"]
16-
}
7+
"generate-docs": {
8+
"command": "npx zod2md --config packages/models/zod2md.config.ts",
9+
"cache": true,
10+
"inputs": ["production", "^production", "{projectRoot}/zod2md.config.ts"],
11+
"outputs": ["{projectRoot}/docs/models-reference.md"]
1712
},
18-
"lint": {
19-
"executor": "@nx/linter:eslint",
20-
"outputs": ["{options.outputFile}"],
21-
"options": {
22-
"lintFilePatterns": [
23-
"packages/models/**/*.ts",
24-
"packages/models/package.json"
25-
]
26-
}
13+
"build": {
14+
"dependsOn": [
15+
"^build",
16+
"generate-docs",
17+
{ "projects": "models-transformers", "target": "build" }
18+
],
19+
"executor": "@nx/js:tsc"
2720
},
21+
"lint": {},
2822
"unit-test": {
2923
"executor": "@nx/vite:test",
3024
"options": {
@@ -36,12 +30,6 @@
3630
"options": {
3731
"configFile": "packages/models/vitest.int.config.ts"
3832
}
39-
},
40-
"generate-docs": {
41-
"command": "npx zod2md --config packages/models/zod2md.config.ts",
42-
"cache": true,
43-
"inputs": ["production", "^production", "{projectRoot}/zod2md.config.ts"],
44-
"outputs": ["{projectRoot}/packages/models/docs/models-reference.md"]
4533
}
4634
},
4735
"tags": ["scope:shared", "type:util", "publishable"]

0 commit comments

Comments
 (0)