头图

We can install SAP UI5 Tools using the following command line:

npm install --global @ui5/cli

Enter an empty folder and execute the command line ui5 init report an error:

Initialization not possible: Missing package.json file

Then use the command line npm init to generate a package.json :

Then re-execute ui5 init :

A new error message appears:

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

Then I manually create a webapp folder.

After init is executed successfully, a ui5.yaml file is automatically created:

The content is as follows:

According to my article using generator-easy-ui5 to quickly create the project structure of SAP UI5 application tools, create a basic file hierarchy required for SAP UI5 applications.

After generation, check the script defined in the script area in package.json :

"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"
    },

The fiori command in the script is the command prompt tool CLI of SAP UI5 Tools mentioned in the title of this article.

Execute npm run start , the actual command executed is fiori run --open 'index.html' :

The final result when running:

If we run fiori deploy directly, an error will be reported:

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

It needs to be run in the npm wrapper:

npm run deploy:

wrong information:

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

It means that deployment configuration is not detected and another command needs to be run first: npm run deploy-config .

First select the ABAP environment:

This command line npm run deploy-config is still running at the bottom of yo :

Target System URL , just maintain one first, you can modify it later:

Enter the name of the bsp application generated after deployment to the ABAP system and the name of the stored ABAP package, and deployment configuration can be successfully generated:

More Jerry's original articles, all in: "Wang Zixi":


注销
1k 声望1.6k 粉丝

invalid