关于sap:SAP-UI5-Tools-使用简介

3次阅读

共计 1449 个字符,预计需要花费 4 分钟才能阅读完成。

咱们能够应用如下命令行装置 SAP UI5 Tools:

npm install –global @ui5/cli

进入一个空的文件夹,执行命令行 ui5 init 报错:

Initialization not possible: Missing package.json file

而后用命令行 npm init 生成一个 package.json:

而后从新执行 ui5 init

呈现新的谬误音讯:

Could not detect project type: Could not find ‘webapp’ or ‘src’ / ‘test’ folders.
Applications should only have a ‘webapp’ folder.

那么我就手动创立一个 webapp 文件夹。

之后 init 执行胜利,主动创立了一个 ui5.yaml 文件:

内容如下:

依照我这篇文章 应用 generator-easy-ui5 疾速创立 SAP UI5 利用的工程构造 介绍的工具,创立一个 SAP UI5 利用所需的根本文件层级构造。

生成之后,查看其 package.json 里 script 区域定义的脚本:

"scripts": {
        "start": "fiori run --open'index.html'","start-local":"fiori run --config ./ui5-local.yaml --open 'index.html'",
        "start-noflp": "fiori run --open'index.html'","build":"ui5 build -a --clean-dest --include-task=generateManifestBundle generateCachebusterInfo","deploy":"fiori verify","deploy-config":"fiori add deploy-config","unit-tests":"fiori run --open test/unit/unitTests.qunit.html","int-tests":"fiori run --open test/integration/opaTests.qunit.html"
    },

脚本里的 fiori 命令,即是本文题目提到的 SAP UI5 Tools 的命令提示行工具 CLI

执行 npm run start,理论执行的命令是 fiori run --open 'index.html'

最初运行时的成果:

咱们间接运行 fiori deploy,会报错:

‘fiori’ is not recognized as an internal or external command,
operable program or batch file.

须要在 npm 这个 wrapper 里运行:

npm run deploy:

谬误音讯:

No deployment configuration has been detected. Run npm run deploy-config to add configuration first.

意思是没有检测到 deployment configuration,须要先运行另一个命令:npm run deploy-config

首先抉择 ABAP 环境:

这个命令行 npm run deploy-config 底层运行的还是 yo

Target System URL,先轻易保护一个,后续能够批改:

输出部署到 ABAP 零碎后生成的 bsp 利用名称和存储的 ABAP package 名称,即可胜利生成 deployment configuration

更多 Jerry 的原创文章,尽在:” 汪子熙 ”:

正文完
 0