Skip to content

Commit 72ef9d5

Browse files
committed
Reformat design description
1 parent 8be679a commit 72ef9d5

File tree

5 files changed

+21
-41
lines changed

5 files changed

+21
-41
lines changed

rfcs/0006-local-dependency-resolution.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,12 @@ It should be possible to use local copies of selected dependencies, while others
4646

4747
A new kind of configuration file should be introduced, allowing to define "UI5 Workspaces". In a first step, and to address the key purpose of this RFC, this configuration shall allow for influencing the dependency resolution when working with a UI5 project.
4848

49-
For this, it should be possible to define locations at which UI5 Tooling will look for a dependency first, before falling back to the regular dependency resolution:
49+
For this, it should be possible to define locations at which UI5 Tooling will look for a dependency first, before falling back to the regular dependency resolution.
5050

51-
![Standard dependency resolution without workspace configuration](./resources/0006-workspace-setup/Standard_Dependency_Resolution.svg)
52-
53-
Without any workspace configuration, dependencies of the openui5-sample-app are retrieved from the npm registry, stored in a central directory on the file system and used from there.
51+
**Examples:**
5452

5553
------
5654

57-
![Workspace configuration for using local version of a single library](./resources/0006-workspace-setup/Workspace_Configuration_Single_Lib.svg)
58-
5955
**ui5-workspace.yaml**
6056
```yaml
6157
specVersion: workspace/1.0
@@ -66,11 +62,11 @@ dependencyManagement:
6662
- ../openui5/src/sap.ui.core
6763
```
6864
69-
By configuring an additional resolution path, pointing to the directory of the sap.ui.core package within the OpenUI5 development repository, that package will be used instead of the one retrieved from the npm repository.
65+
By configuring an additional resolution path, pointing to the directory of the sap.ui.core package within the OpenUI5 development repository, that package will be used instead of the one retrieved from the npm repository:
7066
71-
------
67+
![Workspace configuration for using local version of a single library](./resources/0006-workspace-setup/Workspace_Configuration_Single_Lib.svg)
7268
73-
![Workspace configuration for using local version of all OpenUI5 libraries](./resources/0006-workspace-setup/Workspace_Configuration_All_OpenUI5.svg)
69+
------
7470
7571
**ui5-workspace.yaml**
7672
```yaml
@@ -84,6 +80,14 @@ dependencyManagement:
8480
8581
For resolving all modules in OpenUI5, it should be enough to provide a path to the root directory. UI5 Tooling shall then use the [npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) configuration in the [package.json](https://github.com/SAP/openui5/blob/b74d3c2f153d7a23a2c9b914280b14b7289d7880/package.json#L128) to resolve all libraries located in the repository. Alternatively, a dedicated `ui5.workspaces` configuration in the package.json can be used.
8682

83+
![Workspace configuration for using local version of all OpenUI5 libraries](./resources/0006-workspace-setup/Workspace_Configuration_All_OpenUI5.svg)
84+
85+
------
86+
87+
For reference, this is how a standard dependency resolution, without a workspace configuration looks like. Dependencies of the openui5-sample-app are retrieved from the npm registry, stored in a central directory on the file system and used from there:
88+
89+
![Standard dependency resolution without workspace configuration](./resources/0006-workspace-setup/Standard_Dependency_Resolution.svg)
90+
8791
------
8892

8993
Since every workspace configuration is identifiable by a name, multiple workspaces can be configured in the same file:
@@ -106,6 +110,8 @@ dependencyManagement:
106110
- ../openui5
107111
```
108112

113+
------
114+
109115
Workspace names should be restricted in a reasonable matter (max length, only selected special characters). In addition, there shall be reserved names with special functionality:
110116
* `default`: This workspace should always be used, even if no `--workspace` parameter is provided to the CLI
111117
* `dev`: This workspace should always be used **unless**:
-26 KB
Binary file not shown.

rfcs/resources/0006-workspace-setup/Standard_Dependency_Resolution.svg

Lines changed: 2 additions & 10 deletions
Loading

rfcs/resources/0006-workspace-setup/Workspace_Configuration_All_OpenUI5.svg

Lines changed: 2 additions & 11 deletions
Loading

rfcs/resources/0006-workspace-setup/Workspace_Configuration_Single_Lib.svg

Lines changed: 2 additions & 11 deletions
Loading

0 commit comments

Comments
 (0)