@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.

Source:
Example

sample resources.json

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
		}
	]
};
Parameters:
Name Type Description
parameters object Parameters
Properties
Name Type Attributes Description
workspace @ui5/fs/DuplexCollection DuplexCollection to read and write files
dependencies @ui5/fs/AbstractReader Reader or Collection to read dependency files
taskUtil @ui5/project/build/helpers/TaskUtil | object <optional>
TaskUtil
options object Options
Properties
Name Type Description
projectName string Project name
Returns:
Promise resolving with undefined once data has been written
Type
Promise.<undefined>