generator-ui5-project icon indicating copy to clipboard operation
generator-ui5-project copied to clipboard

QoL change: projectname ↔ "name" attribute in package.json

Open wridgeu opened this issue 2 years ago • 0 comments

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.

image

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-fields

feedback

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?

wridgeu avatar May 18 '22 14:05 wridgeu