You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _implementors/templates.md
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,10 +37,11 @@ The properties of the file are as follows:
37
37
|`description`| string | Description of the Template. |
38
38
|`documentationURL`| string | Url that points to the documentation of the Template. |
39
39
|`licenseURL`| string | Url that points to the license of the Template. |
40
-
|`options`| object | A map of options that the supporting tools should use to populate different configuration options for the Template. |
40
+
|[`options`](#options)| object | A map of options that the supporting tools should use to populate different configuration options for the Template. |
41
41
|`platforms`| array | Languages and platforms supported by the Template. |
42
42
|`publisher`| string | Name of the publisher/maintainer of the Template. |
43
43
|`keywords`| array | List of strings relevant to a user that would search for this Template. |
44
+
| [`optionalPaths`](#optionalPaths) | array | An array of files or directories that tooling may consider "optional" when applying a Template. Directories are indicated with a trailing `/*`, (eg: `.github/*`).
44
45
{: .table .table-bordered .table-responsive}
45
46
46
47
### <ahref="#options"name="options"class="anchor"> The `options` property</a>
@@ -71,6 +72,30 @@ The `options` property contains a map of option IDs and their related configurat
71
72
72
73
> `Note`: The `options` must be unique for every `devcontainer-template.json`
73
74
75
+
### <ahref="#optionalPaths"name="optionalPaths"class="anchor"> The `optionalPaths` property</a>
76
+
77
+
Before applying a Template, tooling must inspect the `optionalPaths` property of a Template and prompt the user on whether each file or folder should be included in the resulting output workspace folder. A path is relative to the root of the Template source directory.
78
+
79
+
- For a single file, provide the full relative path (without any leading or trailing path delimiters).
80
+
- For a directory, provide the full relative path with a trailing slash and asterisk (`/*`) appended to the path. The directory and its children will be recursively ignored.
81
+
82
+
Examples are shown below:
83
+
84
+
```jsonc
85
+
{
86
+
"id":"cpp",
87
+
"version":"3.0.0",
88
+
"name":"C++",
89
+
"description":"Develop C++ applications",
90
+
"optionalPaths": [
91
+
"GETTING-STARTED.md", // Single file
92
+
"example-project-1/MyProject.csproj", // Single file in nested directory
93
+
".github/*"// Entire recursive contents of directory
94
+
]
95
+
}
96
+
```
97
+
98
+
74
99
### <ahref="#referencing-a-template"name="referencing-a-template"class="anchor"> Referencing a Template </a>
75
100
76
101
The `id` format (`<oci-registry>/<namespace>/<template>[:<semantic-version>]`) dictates how a [supporting tool](/supporting) will locate and download a given Template from an OCI registry. For example:
0 commit comments