Methods
(async) install(libraryNames) → {@ui5/project/ui5Framework/AbstractResolver~ResolverInstallResult}
- Description:
- Installs the provided libraries and their dependencies
- Source:
Example
const resolver = new Sapui5Resolver({version: "1.76.0"});
// Or for OpenUI5:
// const resolver = new Openui5Resolver({version: "1.76.0"});
resolver.install(["sap.ui.core", "sap.m"]).then(({libraryMetadata}) => {
// Installation done
}).catch((err) => {
// Handle installation errors
});
Parameters:
Name | Type | Description |
---|---|---|
libraryNames |
Array.<string> | List of library names to be installed |
Returns:
Resolves with an object containing the
libraryMetadata
Type Definitions
LibraryMetadataEntry
- Description:
- Library metadata entry
- Source:
Properties:
Name | Type | Description |
---|---|---|
id |
string | Identifier |
version |
string | Version |
path |
string | Path |
dependencies |
Array.<string> | List of dependency ids |
optionalDependencies |
Array.<string> | List of optional dependency ids |
Library metadata entry
Type:
- object
Example
const libraryMetadataEntry = {
"id": "@openui5/sap.ui.core",
"version": "1.75.0",
"path": "~/.ui5/framework/packages/@openui5/sap.ui.core/1.75.0",
"dependencies": [],
"optionalDependencies": []
};
ResolverInstallResult
- Description:
- Install result
- Source:
Properties:
Name | Type | Description |
---|---|---|
libraryMetadata |
object.<string, @ui5/project/ui5Framework/AbstractResolver~LibraryMetadataEntry> | Object containing all installed libraries with library name as key |
Install result
Type:
- object
Example
const resolverInstallResult = {
"libraryMetadata": {
"sap.ui.core": {
// ...
},
"sap.m": {
// ...
}
}
};