Skip to content

Commit 83ceec2

Browse files
committed
docs(documentation): Add component type to configuration page
1 parent 2ff8c59 commit 83ceec2

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

internal/documentation/docs/pages/Configuration.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ See the list of [clients](https://github.com/redhat-developer/yaml-language-serv
1919

2020
```yaml
2121
specVersion: "5.0"
22-
type: application|library|theme-library|module
22+
type: component|application|library|theme-library|module
2323
metadata:
2424
name: some.project.name
2525
```
@@ -29,12 +29,17 @@ metadata:
2929
### Specification Version and -Type
3030
A project must define a specification version (`specVersion`), to which its configuration is compatible to. Also see [Specification Versions](#specification-versions).
3131

32-
In addition, a project must define a `type`. This can be either `application`, `library`, `theme-library` (since Specification Version 1.1), or `module`.
32+
In addition, a project must define a `type`. This can be either `component`, `application`, `library`, `theme-library` (since Specification Version 1.1), or `module`.
3333

3434
The type defines the default path mappings and build tasks. See [UI5 Builder: Types](./Builder.md#types) for details.
3535

3636
:::code-group Example
3737

38+
```yaml [component]
39+
specVersion: "5.0"
40+
type: component
41+
```
42+
3843
```yaml [application]
3944
specVersion: "5.0"
4045
type: application
@@ -125,7 +130,7 @@ resources:
125130
webapp: webapp
126131
```
127132

128-
#### Libraries
133+
#### Libraries and Components
129134
- `src`: Mapped to runtime path `/resources`
130135
- `test`: Mapped to runtime path `/test-resources`
131136

@@ -275,6 +280,21 @@ Projects that use the OpenUI5 framework cannot depend on projects that use the S
275280

276281
::: code-group Example
277282

283+
```yaml [component]
284+
specVersion: "5.0"
285+
type: component
286+
metadata:
287+
name: my.company.app
288+
framework:
289+
name: OpenUI5
290+
version: 1.82.0
291+
libraries:
292+
- name: sap.ui.core
293+
- name: sap.m
294+
- name: sap.ui.table
295+
- name: themelib_sap_fiori_3
296+
```
297+
278298
```yaml [application]
279299
specVersion: "5.0"
280300
type: application
@@ -377,7 +397,7 @@ builder:
377397
- "/resources/my/project/namespace/test/**"
378398
```
379399

380-
```yaml [library or theme-library]
400+
```yaml [component / library / theme-library]
381401
builder:
382402
resources:
383403
excludes:
@@ -431,13 +451,13 @@ By default, the generated cachebuster info file signatures are based on timestam
431451

432452
### Component Preload Generation
433453

434-
For projects of type `application` a `Component-preload.js` bundle is generated by default. This bundle will contain most UI5 runtime-relevant resources of the component.
454+
For projects of type `application` and `component` a `Component-preload.js` bundle is generated by default. This bundle will contain most UI5 runtime-relevant resources of the component.
435455
You can override this default behavior by defining a `componentPreload` configuration.
436456

437457
For projects of type `library`, no Component Preload is created by default.
438458
However you can define a `componentPreload` configuration to create Component Preload bundles. Those will be created in addition to the `library-preload.js` bundle.
439459

440-
There are two ways to define the set of components for which preload bundles should be generated. You can either provide `paths` (allowing patterns) or `namespaces`. You can also combine both configuration options. Defining any of them overrides the default preload bundle generation for the root component of `application` projects.
460+
There are two ways to define the set of components for which preload bundles should be generated. You can either provide `paths` (allowing patterns) or `namespaces`. You can also combine both configuration options. Defining any of them overrides the default preload bundle generation for the root component of the project.
441461

442462
#### paths
443463

@@ -600,7 +620,7 @@ This configuration can be overwritten more precisely with the CLI parameters `--
600620

601621
### Minification
602622

603-
For projects of types `application` and `library`, minification is done for all JavaScript files. During the minification step debug variants are created, original resources are minified, and source maps are created. You can exclude the resources of a project from minification using a list of glob patterns. Matching resources won't be minified, and no debug variants or source maps will be created.
623+
For projects of types `application`, `component` and `library`, minification is done for all JavaScript files. During the minification step debug variants are created, original resources are minified, and source maps are created. You can exclude the resources of a project from minification using a list of glob patterns. Matching resources won't be minified, and no debug variants or source maps will be created.
604624

605625
The project's `ui5.yaml` file can contain a list of modules declared as glob patterns (resource name patterns) that are excluded from resource minification. Re-includes have to be marked with a leading exclamation mark `!`; see the example below. The order of filters is relevant; a later inclusion overrides an earlier exclusion, and vice versa.
606626

0 commit comments

Comments
 (0)