Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTERNAL] Improve documentation after code refactoring #874

Merged
merged 8 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,8 @@ A list of bundle definitions. A `bundleDefinition` contains of the following opt
**bundleOptions**

- `optimize`: If set to `true`, the module bundle gets minified
- Projects defining [Specification Version](#specification-versions) 3.0 and higher: Defaults to `true`
- Projects defining [Specification Version](#specification-versions) lower than 3.0: Defaults to `false`
- Projects defining [Specification Version](#specification-versions) 3.0 and higher: Defaults to `true`
- Projects defining [Specification Version](#specification-versions) lower than 3.0: Defaults to `false`
- `decorateBootstrapModule`: By default set to `false`. If set to `true`, the module will be decorated with an optimization marker
- `addTryCatchRestartWrapper`: By default set to `false`. If set to `true`, bootable module bundles gets wrapped with a try/catch to filter "Restart" errors
- `usePredefineCalls`: If set to `true`, `sap.ui.predefine` is used for UI5 modules
Expand Down
23 changes: 12 additions & 11 deletions docs/pages/extensibility/CustomTasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ Please note that custom tasks from third parties can not only modify your projec

You can configure your build process with additional build task. These custom tasks are defined in the project [configuration](../Configuration.md).

To hook your custom tasks into the different build phases of a project, they need to reference other tasks to be executed before or after. This can be a [standard task](../Builder.md#standard-tasks) or another custom task. Note that a custom task will only be executed if the referenced task is executed (i.e. is not disabled).
To hook your custom tasks into the different build phases of a project, they need to reference other tasks to be executed before or after. This can be a [standard task](../Builder.md#standard-tasks) or another custom task.
Standard tasks that are disabled, even though they are not executed, can still be referenced by custom tasks, which will be performed in their designated position.

In the below example, when building the library `my.library` the custom `babel` task will be executed before the standard task `generateComponentPreload`.
Another custom task called `renderMarkdownFiles` is then executed immediately after the standard task `minify`.
Another custom task called `render-markdown-files` is then executed immediately after the standard task `minify`.

### Example: Basic configuration

```yaml
# In this example configuration two custom tasks are defined: 'babel' and 'renderMarkdownFiles'.
# In this example configuration two custom tasks are defined: 'babel' and 'render-markdown-files'.
d3xter666 marked this conversation as resolved.
Show resolved Hide resolved
specVersion: "3.1"
type: library
metadata:
Expand All @@ -27,7 +28,7 @@ builder:
customTasks:
- name: babel
beforeTask: generateComponentPreload
- name: renderMarkdownFiles
- name: render-markdown-files
afterTask: minify
configuration:
markdownStyle:
Expand All @@ -39,17 +40,17 @@ builder:
You can also connect multiple custom tasks with each other. The order in the configuration is important in this case. You have to make sure that a task is defined *before* you reference it via `beforeTask` or `afterTask`.

```yaml
# In this example 'myCustomTask2' gets executed after 'myCustomTask1'.
# In this example 'my-custom-task-2' gets executed after 'my-custom-task-1'.
d3xter666 marked this conversation as resolved.
Show resolved Hide resolved
specVersion: "3.1"
type: library
metadata:
name: my.library
builder:
customTasks:
- name: myCustomTask1
- name: my-custom-task-1
beforeTask: generateComponentPreload
- name: myCustomTask2
afterTask: myCustomTask1
- name: my-custom-task-2
afterTask: my-custom-task-1
```

## Custom Task Extension
Expand All @@ -63,7 +64,7 @@ specVersion: "3.1"
kind: extension
type: task
metadata:
name: renderMarkdownFiles
name: render-markdown-files
task:
path: lib/tasks/renderMarkdownFiles.js
```
Expand All @@ -86,7 +87,7 @@ metadata:
name: my.library
builder:
customTasks:
- name: renderMarkdownFiles
- name: render-markdown-files
afterTask: minify
configuration:
markdownStyle:
Expand All @@ -97,7 +98,7 @@ specVersion: "3.1"
kind: extension
type: task
metadata:
name: renderMarkdownFiles
name: render-markdown-files
task:
path: lib/tasks/renderMarkdownFiles.js
```
Expand Down
2 changes: 1 addition & 1 deletion docs/updates/migrate-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ The following processors have been removed:

| UI5 Tooling v2 | UI5 Tooling v3 | Note |
| --------------------------- | --------------------------- | ------------------------- |
| createDebugFiles<br/>uglify | minify | The minify task is executed earlier, before the bundling process takes place. Any existing 'beforeTask' or 'afterTask' configuration of custom tasks might need to be adapted to cater for this change. |
| createDebugFiles<br/>uglify | minify | The minify task is executed earlier, before the bundling process takes place. Any existing `beforeTask` or `afterTask` configuration of custom tasks might need to be adapted to cater for this change. <br>To adapt, you can use the `generateResourcesJson` for subscription before or after the last standard task. By default, `generateResourcesJson` is disabled, but you can still subscribe to it, ensuring your custom task executes in the correct order. |
d3xter666 marked this conversation as resolved.
Show resolved Hide resolved
| generateVersionInfo | generateVersionInfo | The task is no longer executed by default for application projects. It can be re-enabled by using the `--include-task` parameter. |
| generateManifestBundle | *None* | This task was only needed for the HTML5 repository in Cloud Foundry. Meanwhile, the HTML5 repository implemented its own mechanism, so the task is no longer needed |

Expand Down
Loading