天天看点

SAP Fiori Elements 应用 manifest.json 文件里 resources.json 的含义

在 使用 Visual Studio Code Fiori Tools 生成的 SAP Fiori Elements 应用里,在工程描述文件 manifest.json 里,有这样一个字段:

“resources”: “resources.json”,

SAP Fiori Elements 应用 manifest.json 文件里 resources.json 的含义

resources.json 的作用,在 SAP 帮助文档里有提到:

https://help.sap.com/viewer/468a97775123488ab3345a0c48cadd8f/7.52.5/en-US/adcbcf8b50924556ab3f321fcd9353ea.html

The Resources.json file lists all resources in a component or library folder. It resides next to each manifest.json in the generated results.

The file is generated during build time and its main purpose is for mobile packaging, as resources.json mentions all files inside the application. If an app has a resources.json file, it is mentioned in the manifest.json under sap.app/resources.

This file is used by SAP Tools like the SAP Fiori Client Packager. It will be generated automatically when using SAP WebIDE.

The list of resources is stored in an array in the resources property of the top level JSON object. The top level object can also contain the _version property, which can be omitted if the value is 1.0.0. For each resource, the following entries are possible:

在本文开头的截图里,尚未发现 resources.json 的存在。执行 npm run build:

SAP Fiori Elements 应用 manifest.json 文件里 resources.json 的含义

成功生成了 dist 文件,里面包含 component-preload.js, manifest-bundle.zip.

SAP Fiori Elements 应用 manifest.json 文件里 resources.json 的含义
SAP Fiori Elements 应用 manifest.json 文件里 resources.json 的含义