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: packages/documentation/docs/pages/Builder.md
+40-28Lines changed: 40 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,20 @@ The [UI5 Builder](https://github.com/SAP/ui5-builder) module takes care of build
4
4
5
5
Based on a project's type, the UI5 Builder defines a series of build steps to execute; these are also called "tasks".
6
6
7
-
For every type there is a set of default tasks. You can disable single tasks using the `--exclude-task`[CLI parameter](./CLI.md#ui5-build), and you can include tasks using the `--include-task` parameter.
7
+
For every type there is a set of default tasks. You can disable single tasks using the `--exclude-task`[CLI parameter](./CLI#ui5-build), and you can include tasks using the `--include-task` parameter.
Tasks are specific build steps to be executed during build phase.
13
17
14
18
They are responsible for collecting resources which can be modified by a processor. A task configures one or more processors and supplies them with the collected resources. After the respective processor processed the resources, the task is able to continue with its workflow.
15
19
16
-
A project can add custom tasks to the build by using the [Custom Tasks Extensibility](./extensibility/CustomTasks.md).
20
+
A project can add custom tasks to the build by using the [Custom Tasks Extensibility](./extensibility/CustomTasks).
17
21
18
22
### Standard Tasks
19
23
@@ -43,14 +47,14 @@ All available standard tasks are documented [in the API reference](https://ui5.g
*Disabled tasks can be activated by certain build modes, the project configuration, or by using the `--include-task`[CLI parameter](./CLI.md#ui5-build). See footnotes where given*
50
+
*Disabled tasks can be activated by certain build modes, the project configuration, or by using the `--include-task`[CLI parameter](./CLI#ui5-build). See footnotes where given*
47
51
48
52
---
49
53
50
54
^1^ Enabled in `jsdoc` build, which disables most of the other tasks
51
-
^2^ Enabled for projects defining a [component preload configuration](./Configuration.md#component-preload-generation)
55
+
^2^ Enabled for projects defining a [component preload configuration](./Configuration#component-preload-generation)
52
56
^3^ Enabled in `self-contained` build, which disables `generateComponentPreload` and `generateLibraryPreload`
53
-
^4^ Enabled for projects defining a [bundle configuration](./Configuration.md#custom-bundling)
57
+
^4^ Enabled for projects defining a [bundle configuration](./Configuration#custom-bundling)
54
58
^5^ Can be enabled for framework projects via the `includeTask` option. For other projects, this task is skipped
55
59
56
60
### minify
@@ -65,24 +69,30 @@ Related to this, the bundling tasks will also incorporate the generated source m
65
69
66
70
#### Input Source Maps
67
71
68
-
!!! info
69
-
Support for input source maps has been added in UI5 CLI [`v3.7.0`](https://github.com/SAP/ui5-cli/releases/tag/v3.7.0).
72
+
::: info Info
73
+
Support for input source maps has been added in UI5 CLI [`v3.7.0`](https://github.com/SAP/ui5-cli/releases/tag/v3.7.0).
74
+
75
+
:::
70
76
71
77
For projects facilitating transpilation (such as TypeScript-based projects), it is commonly desired to debug in the browser using the original sources, e.g. TypeScript files. To make this work, the transpilation process first needs to create source maps and reference them in the generated JavaScript code.
72
78
73
79
UI5 CLI's `minify` task will then find this reference and incorporate the source map into the minification process. In the end, the minified JavaScript resources will reference an updated source map, which reflects the transpilation as well as the minification. The browser can use this to map every statement back to the original TypeScript file, making debugging a breeze.
74
80
75
-
!!! warning
76
-
If a resource has been modified by another build task before `minify` is executed, any referenced source map will be ignored. This is to ensure the integrity of the source maps in the build result.
81
+
::: warning Warning
82
+
If a resource has been modified by another build task before `minify` is executed, any referenced source map will be ignored. This is to ensure the integrity of the source maps in the build result.
83
+
84
+
It is possible that the modification of the resource content is not reflected in the associated source map, rendering it corrupted. A corrupt source map can make it impossible to properly analyze and debug a resource in the browser development tools.
77
85
78
-
It is possible that the modification of the resource content is not reflected in the associated source map, rendering it corrupted. A corrupt source map can make it impossible to properly analyze and debug a resource in the browser development tools.
86
+
Standard tasks which may modify resources without updating the associated source maps currently include `replaceVersion`, `replaceCopyright`and `replaceBuildtime`.
79
87
80
-
Standard tasks which may modify resources without updating the associated source maps currently include `replaceVersion`, `replaceCopyright` and `replaceBuildtime`.
88
+
:::
81
89
82
90
Expand the block below to view a diagram illustrating the minification process and source map handling.
@@ -156,7 +166,7 @@ UI5 CLI packages JavaScript files that require "top level scope" as a string, pr
156
166
157
167
This ensures that the script works as expected, e.g. with regards to implicitly used globals. However, this `eval` runtime feature will be discontinued with UI5 2.x because of [security best practices](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) and to comply with stricter CSP settings (i.e. [unsafe-eval](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions)).
158
168
159
-
If your project defines [Specification Version 4.0](./Configuration.md#specification-version-40) or higher, files requiring top level scope are no longer part of the created bundle and following error is logged by UI5 CLI:
169
+
If your project defines [Specification Version 4.0](./Configuration#specification-version-40) or higher, files requiring top level scope are no longer part of the created bundle and following error is logged by UI5 CLI:
160
170
> Module myFancyModule requires top level scope and can only be embedded as a string (requires 'eval'), which is not supported with specVersion 4.0 and higher.
161
171
162
172
If you see this error message, please adjust your code by applying one of the following options:
@@ -166,17 +176,19 @@ If you see this error message, please adjust your code by applying one of the fo
166
176
**Option 2**: Wrap the respective files manually in `sap.ui.define` modules as shown below:
Copy file name to clipboardExpand all lines: packages/documentation/docs/pages/CodeAnalysis.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,27 +88,27 @@ The **XMLComposite** control is deprecated since version UI5 1.88. Nevertheless,
88
88
89
89
The [XML Composite Analyzer](https://github.com/SAP/ui5-builder/blob/main/lib/lbt/analyzer/XMLCompositeAnalyzer.js) searches for the name of the configured fragment containing the **XMLComposite** control.
90
90
91
-
=== "Name of the XMLComposite is equal to fragment name"
@@ -128,7 +128,7 @@ Note: Currently only the usage via the global `sap.ui.getCore().initLibrary` is
128
128
129
129
The UI5 CLI offers a JSDoc build, which is enhanced by UI5-specific JSDoc features.
130
130
131
-
An UI5 SDK can be built locally. To get more insight into the local UI5 SDK build setup, have a look at our [Developer's Guide](https://github.com/SAP/openui5/blob/-/docs/developing.md#building-the-openui5-sdk-demo-kit).
131
+
An UI5 SDK can be built locally. To get more insight into the local UI5 SDK build setup, have a look at our [Developer's Guide](https://github.com/SAP/openui5/blob/-/docs/developing#building-the-openui5-sdk-demo-kit).
132
132
133
133
Currently, the resources needed for a UI5 SDK build are stored in [openui5](https://github.com/SAP/openui5/tree/-/lib/jsdoc) and in [ui5-builder](https://github.com/SAP/ui5-builder/blob/main/lib/processors/jsdoc). This double maintenance is needed because these files are not part of the `sap.ui.core` library artefact, so building JSDoc for any library has no access to the needed resources. It's therefore necessary to have these resources also available in the *ui5-builder*. This might change in the future.
0 commit comments