-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
schema.json
154 lines (153 loc) · 4.4 KB
/
schema.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"title": "Web Library Rollup Target (Experimental)",
"description": "Packages a library for different web usages (`UMD`, `ESM`, `CJS`).",
"cli": "nx",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "The path to package.json file."
},
"entryFile": {
"type": "string",
"description": "The path to the entry file, relative to project."
},
"outputPath": {
"type": "string",
"description": "The output path of the generated files."
},
"deleteOutputPath": {
"type": "boolean",
"description": "Delete the output path before building.",
"default": true
},
"tsConfig": {
"type": "string",
"description": "The path to tsconfig file."
},
"format": {
"type": "array",
"description": "Only build the specified comma-separated formats (`esm,umd,cjs`)",
"alias": "f",
"items": {
"type": "string",
"enum": ["esm", "umd", "cjs"]
},
"default": ["esm"]
},
"external": {
"type": "array",
"description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).",
"items": {
"type": "string"
}
},
"watch": {
"type": "boolean",
"description": "Enable re-building when files change.",
"default": false
},
"updateBuildableProjectDepsInPackageJson": {
"type": "boolean",
"description": "Update buildable project dependencies in `package.json`.",
"default": true
},
"buildableProjectDepsInPackageJsonType": {
"type": "string",
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
"enum": ["dependencies", "peerDependencies"],
"default": "peerDependencies"
},
"rollupConfig": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"description": "Path to a function which takes a rollup config and returns an updated rollup config."
},
"umdName": {
"type": "string",
"description": "The name of your module in `UMD` format. Defaulted to your project name."
},
"globals": {
"description": "A mapping of node modules to their `UMD` global names. Used by the `UMD` bundle.",
"type": "array",
"items": {
"type": "object",
"properties": {
"moduleId": {
"type": "string",
"description": "The node module to map from (e.g. `react-dom`)."
},
"global": {
"type": "string",
"description": "The global name to map to (e.g. `ReactDOM`)."
}
},
"additionalProperties": false,
"required": ["moduleId", "global"]
},
"default": []
},
"extractCss": {
"type": ["boolean", "string"],
"description": "CSS files will be extracted to the output folder. Alternatively custom filename can be provided (e.g. styles.css)",
"default": true
},
"assets": {
"type": "array",
"description": "List of static assets.",
"default": [],
"items": {
"$ref": "#/definitions/assetPattern"
}
},
"compiler": {
"type": "string",
"enum": ["babel", "swc"],
"default": "babel",
"description": "Which compiler to use."
},
"javascriptEnabled": {
"type": "boolean",
"description": "Sets `javascriptEnabled` option for less loader",
"default": false
}
},
"required": ["tsConfig", "project", "entryFile", "outputPath"],
"definitions": {
"assetPattern": {
"oneOf": [
{
"type": "object",
"properties": {
"glob": {
"type": "string",
"description": "The pattern to match."
},
"input": {
"type": "string",
"description": "The input directory path in which to apply `glob`. Defaults to the project root."
},
"output": {
"type": "string",
"description": "Relative path within the output folder."
}
},
"additionalProperties": false,
"required": ["glob", "input", "output"]
},
{
"type": "string"
}
]
}
}
}