Closed ttay265 closed 3 years ago
Hi ttay265,
I've just tried and get the same thing. @IObert does this have something to do with Cloud Foundry?
Thanks!
Hi ttay265,
I've just tried and get the same thing. @IObert does this have something to do with Cloud Foundry?
Thanks!
Hello brandoncaulfield, I tried SAP Netweaver as the host, not Cloud Foundry, and still issues.
Thanks,
Hi,
I designed it that way to allow multiple web apps in one project. If the webapp
folder would be in the project root, there could be only one of them. So this is not specific to CF.
I'm open to suggestions if you have an idea to organize this differently.
Hi IObert, Thank you for your answer. It's clear enough for me. I suggest we could have an option to choose the project root instead of forcing to put webapp in uimodule. Thanks
Hi @IObert ,
May I ask why you would want multiple webapps in one project? I always assumed it was one project, one webapp.
I personally would also find it very useful to have the option to allow the webapp to be placed in the root folder. Is that something I could help add/ contribute to the code base myself?
Thanks @IObert
Hi @ttay265, Hi @brandoncaulfield,
yes, I can see that this is a valid use-case and it makes sense to add a prompt like "Is this a single web app project?" to the generator. I'm currently on vacation and don't think it'll get to this any time soon. So I'd be very happy if you could help out and create a PR for this.
Regards, Marius
Hi @ttay265, Hi @brandoncaulfield,
yes, I can see that this is a valid use-case and it makes sense to add a prompt like "Is this a single web app project?" to the generator. I'm currently on vacation and don't think it'll get to this any time soon. So I'd be very happy if you could help out and create a PR for this.
Regards, Marius
Hi @IObert,
Sure, I'll take a stab at it and let you know. I might have some queries here and there but lets see how I get on. :)
Hi @IObert,
I've added the prompt but not sure exactly how you'd like me to add the new template. Should I just reference a new folder structure or is there a better way? :)
My gut feeling would be to reuse the "newwebapp" sub-generator and to add a condition that will rewrite the target path (and remove the "uimodule") there. I did something similar here when the subgenerator is called a second time.
Please also add a check that will prevent this sub-generator can be called a second time as this would override the original webapp folder.
Hi @IObert,
Thanks for the advice. I found that point as well and have been trying it out. I've made the following changes in the newwebapp sub-gen: here Trying to add the if logic as well.
Bu I wanted to see if I could get it to work before writing in the IF condition and I come out with a strange error both in debugging and in a normal test at this point it seems - here
Debugger error:
Normal test using yo easy-ui5:
I'm not sure what's happened because the file paths seem to be updated without the "uimodule" correctly.
I feel like I'm missing the bigger context somewhere here...
Thanks @IObert ! Hope you're having a good vacation!
I just had a very short look but it might be that your replacement turns a relative path in an absolute path (uimodule/webapp -> /webapp).
That could explain why the ui5.yaml file is directly on C:\ in your case
One more thing just came to my mind. Please make sure the sub-generator for "newview" and "newcontrols" will continue to work when the folder hierarchy changes
Hi @IObert ,
Apologies for the delay but it's been very hectic. I've still got this on my todo list and will get back on it asap!
FYI : We moved the code that is addressed by this issue to another repo. Please do the PR here once you find the time: https://github.com/ui5-community/generator-ui5-project
Easy-Ui5 version: 6.9.0 OS/version: Windows 10 Browser/version (+device/version): Chrome Steps to reproduce the problem:
What is the expected result? The folder webapp should be right below the root folder (same level as node_modules)
What happens instead? The folder webapp is contained in uimodule folder