/
schema.json
174 lines (174 loc) · 5.22 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
"title": "esbuild (experimental)",
"description": "Bundle a package for different platforms. Note: declaration (*.d.ts) file are not currently generated.",
"cli": "nx",
"type": "object",
"properties": {
"main": {
"type": "string",
"description": "The path to the entry file, relative to project.",
"alias": "entryFile",
"x-completion-type": "file",
"x-completion-glob": "**/*@(.js|.ts)"
},
"outputPath": {
"type": "string",
"description": "The output path of the generated files.",
"x-completion-type": "directory"
},
"outputFileName": {
"type": "string",
"description": "Name of the main output file. Defaults same basename as 'main' file."
},
"tsConfig": {
"type": "string",
"description": "The path to tsconfig file.",
"x-completion-type": "file",
"x-completion-glob": "tsconfig.*.json"
},
"project": {
"type": "string",
"description": "The path to package.json file."
},
"additionalEntryPoints": {
"type": "array",
"description": "List of additional entry points.",
"items": { "type": "string" },
"default": []
},
"format": {
"type": "array",
"description": "List of module formats to output. Defaults to matching format from tsconfig (e.g. CJS for CommonJS, and ESM otherwise).",
"alias": "f",
"items": { "type": "string", "enum": ["esm", "cjs"] }
},
"watch": {
"type": "boolean",
"description": "Enable re-building when files change.",
"default": false
},
"assets": {
"type": "array",
"description": "List of static assets.",
"default": [],
"items": {
"$ref": "#/definitions/assetPattern"
}
},
"deleteOutputPath": {
"type": "boolean",
"description": "Remove previous output before build.",
"alias": "clean",
"default": true
},
"external": {
"type": "array",
"description": "Mark one or more module as external. Can use * wildcards, such as '*.png'.",
"items": {
"type": "string"
}
},
"format": {
"type": "array",
"description": "Set the output format(s).",
"alias": "f",
"items": {
"type": "string",
"enum": ["esm", "cjs"]
},
"default": ["esm"]
},
"outputHashing": {
"type": "string",
"description": "Define the output filename cache-busting hashing mode.",
"default": "none",
"enum": ["none", "all"]
},
"metafile": {
"type": "boolean",
"description": "Generate a meta.json file in the output folder that includes metadata about the build. This file can be analyzed by other tools.",
"default": false
},
"sourcemap": {
"type": "boolean",
"alias": "sourceMap",
"description": "Generate sourcemap.",
"default": false
},
"minify": {
"type": "boolean",
"description": "Minifies outputs.",
"default": false
},
"platform": {
"type": "string",
"description": "Platform target for outputs.",
"enum": ["browser", "node", "neutral"],
"default": "node"
},
"target": {
"type": "string",
"description": "The environment target for outputs.",
"default": "esnext"
},
"skipTypeCheck": {
"type": "boolean",
"description": "Skip type-checking via TypeScript. Skipping type-checking speeds up the build but type errors are not caught.",
"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"
},
"esbuildOptions": {
"type": "object",
"description": "Additional options to pass to esbuild. See https://esbuild.github.io/api/.",
"additionalProperties": true
}
},
"required": ["tsConfig", "main", "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."
},
"ignore": {
"description": "An array of globs to ignore.",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": ["glob", "input", "output"]
},
{
"type": "string"
}
]
}
},
"additionalProperties": true,
"examplesFile": "../../../docs/esbuild-examples.md"
}