Skip to content

ThemeBuilder ​

@ui5/builder/processors/ThemeBuilder.ThemeBuilder ​

Builds a library theme

Constructor ​

new ThemeBuilder(fs)
​

Description: Constructor

Source: builder/lib/processors/themeBuilder.js, line 20

Parameters: ​
NameTypeDescription
fsfs | module:@ui5/fs/fsInterfaceNode fs or custom
fs interface

Methods ​

build(resources, optionsopt) → {Promise<Array<@ui5/fs/Resource>>}
​

Description: Starts the theme build

Source: builder/lib/processors/themeBuilder.js, line 41

Parameters: ​
NameTypeAttributesDescription
resourcesArray<@ui5/fs/Resource>Library files
optionsobjectoptionalBuild options
Properties:
NameTypeAttributesDefaultDescription
compressbooleanoptionalfalseCompress build output (CSS / JSON)
Returns: ​

Resolving with array of created files

Type: Promise<Array<@ui5/fs/Resource>>

clearCache()
​

Description: Clears all cached build results.

Use this method to prevent high memory consumption when building many themes within the same process.

Source: builder/lib/processors/themeBuilder.js, line 98