Constructor
new @ui5/project/ui5Framework/Sapui5Resolver(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
*
|
options
Properties
Name |
Type |
Attributes |
Default |
Description |
version |
string
|
|
|
SAPUI5 version to use |
cwd |
string
|
<optional>
|
process.cwd()
|
Working directory to resolve configurations like .npmrc |
ui5DataDir |
string
|
<optional>
|
"~/.ui5"
|
UI5 home directory location. This will be used to store packages,
metadata and configuration used by the resolvers. Relative to `process.cwd()` |
cacheDir |
string
|
<optional>
|
|
Where to store temp/cached packages. |
packagesDir |
string
|
<optional>
|
|
Where to install packages |
stagingDir |
string
|
<optional>
|
|
The staging directory for packages |
|
Extends
Methods
- Description:
- Installs the provided libraries and their dependencies
- Source:
- Overrides:
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
-
@ui5/project/ui5Framework/AbstractResolver~ResolverInstallResult