Is it necessary to have a hyphen (“-”) in our custom created ember addon ?
(i.e. is “myAddon” fine OR do we need to name it as “my-addon”)
I do know that custom components need to have a hphen to avoid future name clashes while using them as tags in templates (e.g. )
No. Technically, any valid name for a new npm package would be acceptable. If you want to know if a name is valid, see GitHub - npm/validate-npm-package-name: Is the given string an acceptable npm package name?
myAddon
is not valid because it has a capital letter. However, myaddon
would be valid if it were not yet been taken by another npm package.
It is convention to split words with a hyphen.
So in effect an addon is a npm package itself and would follow the same naming and other rules ?
yes, addons are npm packages