Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cap): Allow xs-app.json to be stored in project root instead of webapp #89

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

marcelschork
Copy link

Fix for #88

[CoPilot]
This pull request includes a change to the generators/model/index.js file to improve the handling of the xs-app.json file path for SAP applications. The most important change is the addition of a check to determine whether the xs-app.json file is located in the webapp folder or the project root.

Improvement to file path handling:

  • generators/model/index.js: Added logic to check if xs-app.json is in the webapp folder or the project root, ensuring the correct path is used.

@nicoschoenteich
Copy link
Collaborator

Hi @marcelschork, I just want to make sure I understand this correctly: Is this to account for the possibility that a user might manually move the xs-app.json from projectRoot/uimodule/webapp/ to projectRoot/uimodule/?

@marcelschork
Copy link
Author

marcelschork commented Oct 14, 2024

Hey @nicoschoenteich ,
I ran into this issue while using the generator-ui5-ts-app. I always use this template because it is more sophisticated/opinionated than the one coming from open-ux-tools. Then I manually copied xs-app.json from the previously created uimodule folder to my newly created TS app.
Since I put it always into the root of the UI5 app like other config files, I ended up with this error.

I remember also other templates in BAS, where this file is stored in the root. That's why I thought, we can make the CAP subgenerator just a bit more flexible.

@nicoschoenteich
Copy link
Collaborator

Ok, this makes sense. Thanks a ton for your contribution!

@nicoschoenteich nicoschoenteich merged commit 47c2f91 into main Oct 14, 2024
8 checks passed
@nicoschoenteich nicoschoenteich deleted the fix/cap-subgenerator branch October 14, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants