Skip to content

Commit

Permalink
[INTERNAL] Add Output Styles details (#905)
Browse files Browse the repository at this point in the history
Adds a section which describes the Build Output Styles feature and usage
variants.

Depends on:
- SAP/ui5-project#624
- SAP/ui5-cli#665

---------

Co-authored-by: Günter Klatt <[email protected]>
  • Loading branch information
d3xter666 and KlattG authored Dec 14, 2023
1 parent e7208f6 commit 3937a18
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/pages/Project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

0 comments on commit 3937a18

Please sign in to comment.