SAP / cloud-mta-build-tool

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool
Apache License 2.0
137 stars 57 forks source link

Use UI5 tooling for building html5 modules #722

Closed lemaiwo closed 4 years ago

lemaiwo commented 4 years ago

I would like to use the UI5 tooling in the build process of the MTA build tool. The documentation only mention grunt as builder for html5 modules: https://help.sap.com/viewer/58746c584026430a890170ac4d87d03b/Cloud/en-US/9f778dba93934a80a51166da3ec64a05.html

I have some UI5 tooling extensions which I need in my UI build but this does not work with grunt. Can the UI5 tooling be adapted for building MTA projects?

Thank you in advance!

Kr, Wouter

katunin-ng commented 4 years ago

Hi,

As far as I know, the ui5 tooling are activated by npm. So if you need to trigger specific scripts to build your module, you can do it using the custom builder. For example, the following build configurations are generated by SAP Web IDE for html5 modules:

 build-parameters:
      builder: custom
      commands:
        - npm install
        - npm run build

And in the module's package.json there is the corresponding script defined:

 "scripts": {
    "build": "ui5 build --clean-dest --include-task=generateManifestBundle generateCachebusterInfo"
  },

For more information about custom builder, see here: https://sap.github.io/cloud-mta-build-tool/configuration/#configuring-the-custom-builder

Regards Natalia