SAP / generator-easy-ui5

Meta-generator various project types within the UI5 Universe
https://blogs.sap.com/2021/04/09/easy-ui5-3.0-from-community-contributions-to-community-plugins/
Apache License 2.0
230 stars 72 forks source link

Projects generated are getting wrong namespace #75

Closed nimble-123 closed 3 years ago

nimble-123 commented 3 years ago

Easy-Ui5 version: 3.0.0

OS/version: Windows 10

Browser/version (+device/version): Latest Edge/Chrome

Steps to reproduce the problem:

  1. Start generator via yo easy-ui5
  2. What do you want to do? Create a new OpenUI5/SAPUI5 project
  3. How do you want to name this project? myUI5App
  4. Which namespace do you want to use? com.myorg
  5. On which platform would you like to host the application? SAP NetWeaver
  6. Which view type do you want to use? XML
  7. Where should your UI5 libs be served from? Content delivery network (SAPUI5)
  8. Would you like to create a new directory for the project? Yes

What is the expected result?

Since i did not enter any information and went with the default values for all questions i expected that i could start the project via npm start and get a empty UI5 application starting in my default browser.

What happens instead?

Browser dev tools console was complaining that some models.js file could not be loaded so i looked into the generated source and found the bug. The generator puts wrong values for all namespaces in. If i replace this with the default namespace com.myorg.myUI5App the app starts as expected and i get no error (despite the normal missing i18n and component-preload stuff).

In detail these are the files where i needed to replace the wrong namespace:

Any other information? (attach screenshot if possible)

IObert commented 3 years ago

It's good that you found this, thanks! I did a rollback until the issue is fixed.

PS: You can open an issue for the plugin generators here: https://github.com/ui5-community/generator-ui5-project/.I'll add some issue template tomorrow to explain when to open issue for which repo.