Skip to content

@ui5/builder/tasks/generateResourcesJson

Methods

(static) default(parameters) → {Promise<undefined>}

Description: Task for creating a resources.json file, describing all productive build resources.

The detailed structure can be found in the documentation: https://sdk.openui5.org/topic/adcbcf8b50924556ab3f321fcd9353ea

Not supported in combination with task @ui5/builder/tasks/bundlers/generateStandaloneAppBundle. Therefore it is also not supported in combination with self-contained build.

sample resources.json
js
const resourcesJson = {
	"_version": "1.1.0",
	"resources": [
		{
			"name": "Component-preload.js",
			"module": "application/mine/Component-preload.js",
			"size": 3746,
			"merged": true,
			"included": [
				"application/mine/Component.js",
				"application/mine/changes/coding/MyExtension.js",
				"application/mine/changes/flexibility-bundle.json",
				"application/mine/changes/fragments/MyFragment.fragment.xml",
				"application/mine/manifest.json"
			]
		},
		{
			"name": "resources.json",
			"size": 1870
		},
		{
			"name": "rules/Button-dbg.support.js",
			"module": "application/mine/rules/Button.support.js",
			"size": 211,
			"format": "raw",
			"isDebug": true,
			"required": [
				"application/mine/library.js",
				"sap/ui/core/Control.js"
			],
			"condRequired": [
				"application/mine/changeHandler/SplitButton.js",
				"sap/ui/core/format/DateFormat.js"
			],
			"dynRequired": true,
			"support": true
		}
	]
};

Source: builder/lib/tasks/generateResourcesJson.js, line 45

Parameters:
NameTypeDescription
parametersobjectParameters
Properties:
NameTypeAttributesDescription
workspace@ui5/fs/DuplexCollectionDuplexCollection to read and write files
dependencies@ui5/fs/AbstractReaderReader or Collection to read dependency files
taskUtil@ui5/project/build/helpers/TaskUtil | objectoptionalTaskUtil
optionsobjectOptions
Properties
NameTypeDescription
projectNamestringProject name
Returns:

Promise resolving with undefined once data has been written

Type: Promise<undefined>