Skip to content

Commit bab2040

Browse files
committed
refactor: Make md files vitepress compatible
1 parent 31c0b06 commit bab2040

23 files changed

+1821
-1504
lines changed

packages/documentation/.vitepress/cache/deps/_metadata.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"hash": "81bd2e0d",
2+
"hash": "63a812a9",
33
"configHash": "9f95b6b5",
4-
"lockfileHash": "bc2dc377",
5-
"browserHash": "26e8f67c",
4+
"lockfileHash": "bbb8758d",
5+
"browserHash": "1daff4d0",
66
"optimized": {
77
"vue": {
88
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
99
"file": "vue.js",
10-
"fileHash": "5c7c354e",
10+
"fileHash": "6177bec1",
1111
"needsInterop": false
1212
},
1313
"vitepress > @vue/devtools-api": {
1414
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
1515
"file": "vitepress___@vue_devtools-api.js",
16-
"fileHash": "4ff76e82",
16+
"fileHash": "55d541db",
1717
"needsInterop": false
1818
},
1919
"vitepress > @vueuse/core": {
2020
"src": "../../../node_modules/@vueuse/core/index.mjs",
2121
"file": "vitepress___@vueuse_core.js",
22-
"fileHash": "ddb016a9",
22+
"fileHash": "bf9ced66",
2323
"needsInterop": false
2424
},
2525
"vitepress > @vueuse/integrations/useFocusTrap": {
2626
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
2727
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
28-
"fileHash": "f1dc281a",
28+
"fileHash": "79f836fe",
2929
"needsInterop": false
3030
},
3131
"vitepress > mark.js/src/vanilla.js": {
3232
"src": "../../../node_modules/mark.js/src/vanilla.js",
3333
"file": "vitepress___mark__js_src_vanilla__js.js",
34-
"fileHash": "f86e698d",
34+
"fileHash": "ff322f2a",
3535
"needsInterop": false
3636
},
3737
"vitepress > minisearch": {
3838
"src": "../../../node_modules/minisearch/dist/es/index.js",
3939
"file": "vitepress___minisearch.js",
40-
"fileHash": "6f580467",
40+
"fileHash": "d295f707",
4141
"needsInterop": false
4242
}
4343
},
Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
![UI5 logo](images/UI5_logo_wide.png)
1+
![UI5 logo](./images/UI5_logo_wide.png)
22

33
# UI5 CLI
44

55
An open and modular toolchain to develop state-of-the-art applications based on the [UI5](https://ui5.sap.com) framework.
66

7-
!!! abstract "Project Rename"
8-
**UI5 Tooling has been renamed to UI5 CLI 🚨**
7+
::: warning Project Rename
8+
**UI5 Tooling has been renamed to UI5 CLI 🚨**
99

10-
Read the announcement blog post: **[SAP Community: Goodbye UI5 Tooling - Hello UI5 CLI!](https://community.sap.com/t5/technology-blog-posts-by-sap/goodbye-ui5-tooling-hello-ui5-cli/ba-p/14211769)**
10+
Read the announcement blog post: **[SAP Community: Goodbye UI5 Tooling - Hello UI5 CLI!](https://community.sap.com/t5/technology-blog-posts-by-sap/goodbye-ui5-tooling-hello-ui5-cli/ba-p/14211769)**
11+
:::
1112

12-
!!! tip "New Release"
13-
**UI5 CLI V4 is here 🎉**
13+
::: tip New Release
14+
**UI5 CLI V4 is here 🎉**
1415

15-
Read the announcement blog post: **[SAP Community: UI5 CLI 4.0](https://community.sap.com/t5/technology-blogs-by-sap/ui5-tooling-4-0/ba-p/13769578)**
16+
Read the announcement blog post: **[SAP Community: UI5 CLI 4.0](https://community.sap.com/t5/technology-blogs-by-sap/ui5-tooling-4-0/ba-p/13769578)**
1617

17-
And checkout the **[Migrate to v4](./updates/migrate-v4.md)** documentation.
18+
And checkout the **[Migrate to v4](./updates/migrate-v4)** documentation.
19+
:::
1820

19-
[**Get Started**](./pages/GettingStarted.md){: .md-button .md-button--primary .sap-icon-initiative }
21+
<div style="margin: 2rem 0;">
22+
<a href="./pages/GettingStarted" style="display: inline-block; padding: 12px 24px; background: #1976d2; color: white; text-decoration: none; border-radius: 6px; font-weight: 600;">
23+
🚀 Get Started
24+
</a>
25+
</div>
2026

2127
## Main Features
2228

2329
### 💻 UI5 CLI
2430

25-
*Also see the [UI5 CLI Documentation](./pages/CLI.md)*
31+
*Also see the [UI5 CLI Documentation](./pages/CLI)*
2632

2733
```sh
2834
# Global
@@ -35,7 +41,7 @@ npm install --save-dev @ui5/cli
3541
#### ⚙️ Project Setup
3642

3743
Configure your project for use with UI5 CLI.
38-
*Also see the [Configuration Documentation](./pages/Configuration.md)*
44+
*Also see the [Configuration Documentation](./pages/Configuration)*
3945

4046
```
4147
❯ ui5 init
@@ -64,7 +70,7 @@ Added framework libraries sap.ui.core sap.m themelib_sap_fiori_3 as dependencies
6470
#### 🏄 Development Server
6571

6672
Start a local development server to work on your project.
67-
*Also see the [Server Documentation](./pages/Server.md)*
73+
*Also see the [Server Documentation](./pages/Server)*
6874

6975
```
7076
❯ ui5 serve
@@ -75,7 +81,7 @@ URL: http://localhost:8080
7581
#### 🛠 Build for Production
7682

7783
Build an optimized version of your project.
78-
*Also see the [Builder Documentation](./pages/Builder.md)*
84+
*Also see the [Builder Documentation](./pages/Builder)*
7985

8086
``` bash
8187
❯ ui5 build
@@ -101,38 +107,38 @@ This allows you to rely on UI5 CLI for UI5-specific build functionality and proj
101107

102108
All available APIs are documented in the [UI5 CLI API Reference](https://ui5.github.io/cli/v4/api/index.html).
103109

104-
=== "ESM"
105-
106-
```js linenums="1"
107-
import {graphFromPackageDependencies} from "@ui5/project/graph";
108-
109-
async function buildApp(projectPath, destinationPath) {
110-
const graph = await graphFromPackageDependencies({
111-
cwd: projectPath
112-
});
113-
await graph.build({
114-
destPath: destinationPath,
115-
selfContained: true,
116-
excludedTasks: ["transformBootstrapHtml"],
117-
includedDependencies: ["*"]
118-
});
119-
}
120-
```
121-
122-
=== "CommonJS"
123-
124-
```js linenums="1"
125-
async function buildApp(projectPath, destinationPath) {
126-
const {graphFromPackageDependencies} =
127-
await import("@ui5/project/graph");
128-
const graph = await graphFromPackageDependencies({
129-
cwd: projectPath
130-
});
131-
await graph.build({
132-
destPath: destinationPath,
133-
selfContained: true,
134-
excludedTasks: ["transformBootstrapHtml"],
135-
includedDependencies: ["*"]
136-
});
137-
}
138-
```
110+
#### ESM
111+
112+
```js linenums="1
113+
import {graphFromPackageDependencies} from "@ui5/project/graph";
114+
115+
async function buildApp(projectPath, destinationPath) {
116+
const graph = await graphFromPackageDependencies({
117+
cwd: projectPath
118+
});
119+
await graph.build({
120+
destPath: destinationPath,
121+
selfContained: true,
122+
excludedTasks: ["transformBootstrapHtml"],
123+
includedDependencies: ["*"]
124+
});
125+
}
126+
```
127+
128+
#### CommonJS
129+
130+
```js linenums="1
131+
async function buildApp(projectPath, destinationPath) {
132+
const {graphFromPackageDependencies} =
133+
await import("@ui5/project/graph");
134+
const graph = await graphFromPackageDependencies({
135+
cwd: projectPath
136+
});
137+
await graph.build({
138+
destPath: destinationPath,
139+
selfContained: true,
140+
excludedTasks: ["transformBootstrapHtml"],
141+
includedDependencies: ["*"]
142+
});
143+
}
144+
```

packages/documentation/docs/pages/Benchmarking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ The following is a walk-through on how to evaluate the performance impact of an
102102
1. Prepare your change
103103
1. Switch to the branch that contains your change
104104
```sh
105-
(cd ../ui5-builder && git checkout my-change)
105+
(cd ../pages/ui5-builder && git checkout my-change)
106106
```
107107
1. If your change requires different npm dependencies, reinstall them
108108
```sh
109-
(cd ../ui5-builder && npm install)
109+
(cd ../pages/ui5-builder && npm install)
110110
```
111111
1. The link from UI5 CLI is still in place. However, if you have changes in **multiple** UI5 CLI modules, you might need to `npm link` those again
112112

packages/documentation/docs/pages/Builder.md

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ The [UI5 Builder](https://github.com/SAP/ui5-builder) module takes care of build
44

55
Based on a project's type, the UI5 Builder defines a series of build steps to execute; these are also called "tasks".
66

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.
88

9-
[**API Reference**](https://ui5.github.io/cli/v4/api/index.html){: .md-button .sap-icon-initiative }
9+
<div style="margin: 1rem 0;">
10+
<a href="https://ui5.github.io/cli/v4/api/index.html" target="_blank" style="display: inline-block; padding: 8px 16px; background: #1976d2; color: white; text-decoration: none; border-radius: 4px; font-weight: 600; font-size: 14px;">
11+
📚 API Reference
12+
</a>
13+
</div>
1014

1115
## Tasks
1216
Tasks are specific build steps to be executed during build phase.
1317

1418
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.
1519

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).
1721

1822
### Standard Tasks
1923

@@ -43,14 +47,14 @@ All available standard tasks are documented [in the API reference](https://ui5.g
4347
| generateApiIndex | *disabled* ^1^ | | |
4448
| generateResourcesJson | *disabled* | *disabled* | *disabled* |
4549

46-
*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*
4751

4852
---
4953

5054
^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)
5256
^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)
5458
^5^ Can be enabled for framework projects via the `includeTask` option. For other projects, this task is skipped
5559

5660
### minify
@@ -65,24 +69,30 @@ Related to this, the bundling tasks will also incorporate the generated source m
6569

6670
#### Input Source Maps
6771

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+
:::
7076

7177
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.
7278

7379
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.
7480

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.
7785

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`.
7987

80-
Standard tasks which may modify resources without updating the associated source maps currently include `replaceVersion`, `replaceCopyright` and `replaceBuildtime`.
88+
:::
8189

8290
Expand the block below to view a diagram illustrating the minification process and source map handling.
8391

84-
??? info "Minification Activity Diagram"
85-
![minify Task Activity](../images/UI5_CLI/Task_Minify.svg){ loading=lazy }
92+
::: info Minification Activity Diagram
93+
![minify Task Activity](../images/UI5_CLI/Task_Minify.svg)
94+
95+
:::
8696

8797

8898
### Generation of Supported Locales
@@ -156,7 +166,7 @@ UI5 CLI packages JavaScript files that require "top level scope" as a string, pr
156166

157167
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)).
158168

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:
160170
> 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.
161171
162172
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
166176
**Option 2**: Wrap the respective files manually in `sap.ui.define` modules as shown below:
167177

168178

169-
!!! example
170-
**Before**:
171-
```js
172-
const myFancyModule = {};
173-
```
179+
::: details Example
180+
**Before**:
181+
```js
182+
const myFancyModule = {};
183+
```
174184

175-
**After**:
176-
```js
177-
sap.ui.define([], () => {
178-
"use strict";
179-
const myFancyModule = {};
180-
return myFancyModule;
181-
});
182-
```
185+
**After**:
186+
```js
187+
sap.ui.define([], () => {
188+
"use strict";
189+
const myFancyModule = {};
190+
return myFancyModule;
191+
});
192+
```
193+
194+
:::

packages/documentation/docs/pages/CodeAnalysis.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,27 @@ The **XMLComposite** control is deprecated since version UI5 1.88. Nevertheless,
8888

8989
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.
9090

91-
=== "Name of the XMLComposite is equal to fragment name"
92-
93-
```javascript hl_lines="4"
94-
sap.ui.define([
95-
"sap/ui/core/XMLComposite"
96-
], function(XMLComposite) {
97-
return XMLComposite.extend("composites.MyComposite", {}
98-
});
99-
```
100-
101-
=== "Dedicated fragment name"
102-
103-
```javascript hl_lines="5"
104-
sap.ui.define([
105-
"sap/ui/core/XMLComposite"
106-
], function(XMLComposite) {
107-
return XMLComposite.extend("composites.MyComposite", {
108-
fragment: "composites.custom.MyComposite"
109-
}
110-
});
111-
```
91+
#### Name of the XMLComposite is equal to fragment name
92+
93+
```js
94+
sap.ui.define([
95+
"sap/ui/core/XMLComposite"
96+
], function(XMLComposite) {
97+
return XMLComposite.extend("composites.MyComposite", {}
98+
});
99+
```
100+
101+
#### Dedicated fragment name
102+
103+
```js
104+
sap.ui.define([
105+
"sap/ui/core/XMLComposite"
106+
], function(XMLComposite) {
107+
return XMLComposite.extend("composites.MyComposite", {
108+
fragment: "composites.custom.MyComposite"
109+
}
110+
});
111+
```
112112
113113
## Library Initialization
114114
@@ -128,7 +128,7 @@ Note: Currently only the usage via the global `sap.ui.getCore().initLibrary` is
128128
129129
The UI5 CLI offers a JSDoc build, which is enhanced by UI5-specific JSDoc features.
130130
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).
132132
133133
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.
134134

0 commit comments

Comments
 (0)