Closed wridgeu closed 2 months ago
I'd default to "just name it properly" and let the user decide. Currently we only restrict the project name (and also uimodule name) in a way so that the generator doesn't break. TBH I don't really care whether camel case is used or not - I wouldn't want to interfere with some other guideline or conventions people have in their teams 😅
No one seems to have jumped on this in 2 years, so I will go ahead and close it. Thanks for bringing it up tho.
Totally forgot that I even created that. 2 years later ... yeah, I agree with you. :)
Hey everyone,
I've come to notice that we're using the projectname from the prompt as name within the package.json. This doesn't fit a 100% though.
I'm not sure if there are any restrictions on the UI5 projectname (i.e.
myUI5App
, used as default), at least I haven't come across any so far. I do feel like the common way of naming such projects is all lowercase ("myapp") or sometimes with hyphenation ("my-app").ideas
Would it make sense to either restrict/adjust the way projectnames can be given during the prompt?
https://github.com/ui5-community/generator-ui5-project/blob/4c2e1930a91d03eef728faabe5567f8fd410d4ee/generators/app/index.js#L17-L28
... or would it make more sense to maybe match the RegEx / or just put it all lowercase in the package.json creation?
https://github.com/ui5-community/generator-ui5-project/blob/4c2e1930a91d03eef728faabe5567f8fd410d4ee/generators/app/index.js#L152-L154
infos
name
attribute of package.json: https://docs.npmjs.com/creating-a-package-json-file#required-name-and-version-fieldsfeedback
Would you even consider this being nice to have or do you see this from different PoVs like "just name it properly", "just rename it in package.json later on" or something like that?