-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
nx-json.ts
115 lines (107 loc) · 2.59 KB
/
nx-json.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
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
112
113
114
115
import { PackageManager } from '../utils/package-manager';
import { TargetDependencyConfig } from './workspace-json-project-json';
export type ImplicitDependencyEntry<T = '*' | string[]> = {
[key: string]: T | ImplicitJsonSubsetDependency<T>;
};
export interface ImplicitJsonSubsetDependency<T = '*' | string[]> {
[key: string]: T | ImplicitJsonSubsetDependency<T>;
}
export interface NxAffectedConfig {
/**
* Default based branch used by affected commands.
*/
defaultBase?: string;
}
/**
* Nx.json configuration
*/
export interface NxJsonConfiguration<T = '*' | string[]> {
/**
* Optional (additional) Nx.json configuration file which becomes a base for this one
*/
extends?: string;
/**
* Map of files to projects that implicitly depend on them
*/
implicitDependencies?: ImplicitDependencyEntry<T>;
/**
* Dependencies between different target names across all projects
*/
targetDependencies?: Record<string, TargetDependencyConfig[]>;
/**
* NPM Scope that the workspace uses
*/
npmScope?: string;
/**
* Default options for `nx affected`
*/
affected?: NxAffectedConfig;
/**
* Where new apps + libs should be placed
*/
workspaceLayout?: {
libsDir: string;
appsDir: string;
};
/**
* Available Task Runners
*/
tasksRunnerOptions?: {
[tasksRunnerName: string]: {
/**
* Path to resolve the runner
*/
runner: string;
/**
* Default options for the runner
*/
options?: any;
};
};
/**
* List of default values used by generators.
*
* These defaults are global. They are used when no other defaults are configured.
*
* Example:
*
* ```
* {
* "@nrwl/react": {
* "library": {
* "style": "scss"
* }
* }
* }
* ```
*/
generators?: { [collectionName: string]: { [generatorName: string]: any } };
/**
* Default generator collection. It is used when no collection is provided.
*/
cli?: {
packageManager?: PackageManager;
defaultCollection?: string;
defaultProjectName?: string;
};
/**
* Plugins for extending the project graph
*/
plugins?: string[];
/**
* Configuration for Nx Plugins
*/
pluginsConfig?: Record<string, unknown>;
/**
* Default project. When project isn't provided, the default project
* will be used. Convenient for small workspaces with one main application.
*/
defaultProject?: string;
}
/**
* @deprecated(v14): nx.json no longer contains projects
*/
export interface NxJsonProjectConfiguration {
implicitDependencies?: string[];
tags?: string[];
}