diff --git a/docs/pages/Project.md b/docs/pages/Project.md index 07f7a9dcbd..6ac60bc030 100644 --- a/docs/pages/Project.md +++ b/docs/pages/Project.md @@ -34,4 +34,34 @@ The source directory must contain a directory structure representing the namespa The `module` type is meant for usage with non-UI5 resources like third-party libraries. Their path mapping can be configured freely. During a build, their resources are copied without modifications. +## Build Output Style + +The _Output Style_ offers you control over your project's build output folder. Namespaces like `sap.m` or `sap.ui.core` can be streamlined, producing a more concise and flat output. For example, a resource like `/resources/sap/m/RangeSlider.js` will be transformed into `./RangeSlider.js`. And vice versa, applications that are built by default with `Flat` output, can leverage any namespaces they might have. + +In the table below you can find the available combinations of project type & output style. + +| Project Type / Requested Output Style | Resulting Style | +|---|---| +| **application** | | +| `Default` | Root project is written `Flat`-style. ^1^ | +| `Flat` | Same as `Default`. | +| `Namespace` | Root project is written `Namespace`-style (resources are prefixed with the project's namespace). ^1^ | +| **library** | | +| `Default` | Root project is written `Namespace`-style. ^1^ | +| `Flat` | Root project is written `Flat`-style (without its namespace, logging warnings for resources outside of it). ^1^ | +| `Namespace` | Same as `Default`. | +| **theme-library** | | +| `Default` | Root project is written in the style of the sources (multiple namespaces). ^1^ | +| `Flat` | **Unsupported** ^2^ | +| `Namespace` | **Unsupported** ^2^ | +| **module** | | +| `Default` | Root project is written with the [configured paths](https://sap.github.io/ui5-tooling/stable/pages/Configuration/#available-path-mappings). ^1^ | +| `Flat` | **Unsupported** ^3^ | +| `Namespace` | **Unsupported** ^3^ | + +^1^ The Output Style is only applied to the root project's output folder structure. Any dependencies included in the build would retain their `Default` output style. +^2^ Theme libraries in most cases have more than one namespace. +^3^ Modules have explicit path mappings configured and no namespace concept. + + [**API Reference**](https://sap.github.io/ui5-tooling/v3/api/@ui5_project_build_ProjectBuilder.html){: .md-button .sap-icon-initiative }