/
nx-dotnet-config.interface.ts
71 lines (59 loc) · 1.71 KB
/
nx-dotnet-config.interface.ts
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
import { TargetConfiguration } from '@nx/devkit';
import { ModuleBoundaries } from './nx';
export interface NxDotnetConfigV1 {
/**
* Map of package -> version, used for Single Version Principle.
*/
nugetPackages: {
[key: string]: string | undefined;
};
/**
* Setup module boundary definitions here if not using eslint
*/
moduleBoundaries?: ModuleBoundaries;
/**
* Default solution file
*/
solutionFile?: string;
/**
* Set to false to skip target inference
* @default true
*/
inferProjectTargets?: boolean;
/**
* Set to false to skip project inference
* @default true
*/
inferProjects?: boolean;
}
type PluginTargetConfiguration = TargetConfiguration & {
targetName: string;
};
type ConfiguredTargets = {
build: PluginTargetConfiguration | string | false;
lint: PluginTargetConfiguration | string | false;
serve: PluginTargetConfiguration | string | false;
test: PluginTargetConfiguration | string | false;
};
export type NxDotnetConfigV2 = Omit<NxDotnetConfigV1, 'inferProjectTargets'> & {
/**
* Set to false to skip target inference entirely. Each target's inferred name can be overridden by setting the value here.
*
* e.g. To rename the `build` target to `build:dotnet`, set `inferredTargets.build` to `build:dotnet`.
*/
inferredTargets?: ConfiguredTargets | false;
/**
* Ignores the specified paths when inferring projects
*/
ignorePaths?: string[];
/**
* Tags to apply to inferred projects
*/
tags?: string[];
};
export type NxDotnetConfig = NxDotnetConfigV1 | NxDotnetConfigV2;
export type ResolvedConfig = NxDotnetConfigV2 & {
inferredTargets: false | Required<ConfiguredTargets>;
ignorePaths: string[];
tags: string[];
};