Skip to content

Commit b2ef508

Browse files
committed
feat(@angular-devkit/build-angular): add assets option to server builder
This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files. Closes angular#24203
1 parent 6cc45f6 commit b2ef508

File tree

2 files changed

+436
-0
lines changed

2 files changed

+436
-0
lines changed

packages/angular_devkit/build_angular/src/builders/server/schema.json

+46
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
"title": "Universal Target",
55
"type": "object",
66
"properties": {
7+
"assets": {
8+
"type": "array",
9+
"description": "List of static application assets.",
10+
"default": [],
11+
"items": {
12+
"$ref": "#/definitions/assetPattern"
13+
}
14+
},
715
"main": {
816
"type": "string",
917
"description": "The name of the main entry-point file."
@@ -207,6 +215,44 @@
207215
"additionalProperties": false,
208216
"required": ["outputPath", "main", "tsConfig"],
209217
"definitions": {
218+
"assetPattern": {
219+
"oneOf": [
220+
{
221+
"type": "object",
222+
"properties": {
223+
"followSymlinks": {
224+
"type": "boolean",
225+
"default": false,
226+
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
227+
},
228+
"glob": {
229+
"type": "string",
230+
"description": "The pattern to match."
231+
},
232+
"input": {
233+
"type": "string",
234+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
235+
},
236+
"ignore": {
237+
"description": "An array of globs to ignore.",
238+
"type": "array",
239+
"items": {
240+
"type": "string"
241+
}
242+
},
243+
"output": {
244+
"type": "string",
245+
"description": "Absolute path within the output."
246+
}
247+
},
248+
"additionalProperties": false,
249+
"required": ["glob", "input", "output"]
250+
},
251+
{
252+
"type": "string"
253+
}
254+
]
255+
},
210256
"fileReplacement": {
211257
"oneOf": [
212258
{

0 commit comments

Comments
 (0)