aurelia / new

The Aurelia 2 scaffolding repo used by our tools to setup new projects.
MIT License
35 stars 18 forks source link

Change my-app to just app and some QOL webpack stuff #67

Closed brandonseydel closed 1 month ago

3cp commented 2 years ago

There is a reason for the verbose <my-app> tag name. <app> does not work in ShadomDom, ShadowDom requires a dash in custom element tag name like <my-app>.

3cp commented 2 years ago

For reference, we have a warning for user on such ShadowDom requirement (It's from ShadowDom spec, not Aurelia): https://github.com/aurelia/aurelia/blob/b5356ce80cee2022186950ee3d023f5d063ff05a/packages-cjs/plugin-conventions/src/preprocess-html-template.ts#L43

zewa666 commented 2 years ago

perhaps scaffold the name like <projectname>-app?

brandonseydel commented 2 years ago

perhaps scaffold the name like <projectname>-app?

Yea that was the eventual goal. As far as shadow dom. Do not hurt the 99% for the 1% is my motto. Shadow DOM people rename it.

brandonseydel commented 2 years ago

app-root would be something of better taste as well perhaps

3cp commented 2 years ago

Yes, app-root sounds better than my-app.

BTW, I don't think "makes"' default project name "my-app" matters. People will change it anyway when creating real project. We can even set default project name to "" to force user to type.

brandonseydel commented 2 years ago

@3cp - You give way too much credit. Developers are not like they used to be. They leave it out of the box and tack on. Just like CRA (they don't touch shit)

3cp commented 2 years ago

Might be true. But you should not say that in public :D In that case, how ~/my-app/ is worse than ~/app/? :-)

brandonseydel commented 2 years ago

Its just not professional enough to release into the wild is all.

3cp commented 2 years ago

I don't mind the project name change much. (au2-app might be a good candidate too) For the root component name, let's do <app-root>, it's very clear. The ${projectname}-app is not bad, but it requires more coding without justified benefit. I like the simpler <app-root>. If you update the branch, we can merge them.