Closed js1972 closed 3 years ago
Hi Jason!
Thank you very much for your feedback and helping us improve our tool. In regards to the proposed features:
npm i
at the root of the project it will fail. Nevertheless if I remove the SAP dependencies from the package.json it will install properly. I had to add the SAP dependencies one by one and with different node versions (I installed cds-dk with node 14 and hana-client with node 10). So the problem as far as I am concerned is not so much with concurrently but with the SAP modules which seem to have some sort of incompatibility with certain node versions. I don't think I can do anything about it until they solve this issue, nonetheless I will look into it. Thank you very much Jason and please do not hesitate to open more feature requests :)
Hi @Turutupa I'm wondering how I could use this app generator with a fiori application. What adjustments would be necessary to the mta.yaml or xs-app.json, etc. I assume we can just drop a fiori app created with fiori-tools for example into the /app directory. But would that require adjustments to the html5 app deployer as well?
Hi @js1972 ! Yes, you should be able to simply create the fiori app in the app folder for example and then modify the mta.yaml accordingly. As per your specific request on what adjustments should be made I must confess I don't know.
Fiori apps are still in our roadmap but unfortunately we've experienced some delays. Sorry I couldn't be of more help.
Hi @js1972, it should be quite straight forward, but all depends on how you are building your UI5 app.
In general, for any kind of HTML5 app you have to do only 2 things:
For creating the application build, usually there is script in the package.json
file, usually "npm run build" or similar.
In the mta.yaml file you can list the commands you want to run before deploying in following block:
build-parameters:
before-all:
- builder: custom
commands:
- npm install
- npx @sap/cds-dk build
- npm --prefix ./app install ./app
- npm run build --prefix ./app #This line runs the build script
The last line runs the build script for a standard React project in the /app folder. If you script is different, then just change that line accordingly.
After that, you should have a folder where your build is located (usually named "build" or "dist"). You should specify that directory in the mta.yaml
file, so the HTML5 deployer knows where to get the code to deploy.
# --------------------- FRONTEND APP MODULE ---------------------
- name: your-app-name-html5-app
# ------------------------------------------------------------
type: html5
path: app # root path for your html5 app
build-parameters:
supported-platforms: []
build-result: build # Path to the build folder relative to the root path of your html5 app
So the example above says the HTML5 app is in the <path_where_the_mta.yaml_file_is_located>/app
folder, and after executing the build script, the Build will be in <path_where_the_mta.yaml_file_is_located>/app/build
.
Adapt this as per your configuration.
That should be enough for you to go and deploy the whole MTA app.
Some extra tips:
Cheers! Rafa
@rlopmar thanks for the excellent explanation. Better than sap documentation!! ;-)
What a great tool. Thankyou!
Some awesome features would be: