-
Notifications
You must be signed in to change notification settings - Fork 0
/
nx.json
111 lines (111 loc) · 3.11 KB
/
nx.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"affected": {
"defaultBase": "main"
},
"namedInputs": {
"css": ["{projectRoot}/**/*.css"],
"default": ["{projectRoot}/**/*"],
"rootDotnetConfig": [
"{workspaceRoot}/global.json",
"{workspaceRoot}/Directory.Build.props",
"{workspaceRoot}/Directory.Packages.props"
],
"rootTsConfig": [
"{workspaceRoot}/.config/ts/tsconfig.json",
"{workspaceRoot}/tsconfig.json",
"{workspaceRoot}/tsconfig.options.json"
],
"typescript": ["{projectRoot}/**/*.{ts,tsx}", "{projectRoot}/tsconfig.json"]
},
"targetDefaults": {
"build.net": {
"cache": true,
"dependsOn": ["^build.net"],
"executor": "nx:run-commands",
"inputs": ["rootDotnetConfig", "{projectRoot}/main/**/*"],
"options": {
"command": "dotnet build -c Release {projectRoot}/main"
},
"outputs": ["{projectRoot}/build/{projectName}.main"]
},
"clean": {
"cache": false,
"executor": "nx:run-commands",
"options": {
// shx if needed
"command": "rm -rf build dist",
"cwd": "{projectRoot}"
}
},
"codegen": {
// Create codegen target as a no-op, so that other `targetDefaults` can reference it
"executor": "nx:noop"
},
"coverage.net": {
"cache": true,
"dependsOn": ["build.net"],
"executor": "nx:run-commands",
"inputs": ["rootDotnetConfig", "{projectRoot}/test/**/*"],
"options": {
"commands": [
"dotnet run -c Release --project {projectRoot}/test --coverage --coverage-output {projectName}.cobertura.xml --coverage-output-format cobertura",
// shx if needed
"mkdir -p coverage/raw",
"mv {projectRoot}/build/{projectName}.test/bin/{projectName}.test/release/TestResults/{projectName}.cobertura.xml coverage/raw"
],
"parallel": false
},
"outputs": [
"{projectRoot}/build/{projectName}.test",
"{workspaceRoot}/coverage/raw/{projectName}.cobertura.xml"
]
},
"coverage.vitest": {
"cache": true,
"dependsOn": ["^tsc", "codegen"],
"executor": "nx:run-commands",
"inputs": ["rootTsConfig", "default", "{workspaceRoot}/vitest.config.ts"],
"options": {
"command": "vitest run --coverage --root {projectRoot}"
},
"outputs": ["{workspaceRoot}/coverage/raw/{projectName}.cobertura.xml"]
},
"csharpier": {
"cache": true,
"executor": "nx:run-commands",
"options": {
"command": "dotnet csharpier --check {projectRoot}"
}
},
"eslint": {
"cache": true,
"dependsOn": ["^tsc", "codegen"],
"executor": "nx:run-commands",
"options": {
"command": "eslint -f pretty {projectRoot}"
}
},
"prettier": {
"cache": true,
"executor": "nx:run-commands",
"options": {
"command": "prettier --check '{projectRoot}/**/*.{cjs,csproj,css,cts,esproj,graphql,html,js,json,jsonc,jsx,md,pcss,props,scss,ts,tsp,tsx,xml,yaml,yml}'"
}
},
"tsc": {
"cache": true,
"dependsOn": ["^tsc", "codegen"],
"executor": "nx:run-commands",
"inputs": ["rootTsConfig", "typescript"],
"options": {
"command": "tsc --build {projectRoot}"
},
"outputs": ["{projectRoot}/build/tsc"]
}
},
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
}
}