Open mgenev opened 9 years ago
As far as naming goes, I don't think it's that important. Some people will want to find things by name, but ultimately it comes down to the module possessing the correct dependency on sane-addon
. Programmatically we can validate addon modules at runtime by using npm.commands.view(["addon-module@0.1.0", "dependencies"], callback)
see docs. I do believe that all of the modules should in-fact be node modules published to npm or private git repos. The command-line syntax should be compatible with name@version or git specification for npm.
For the sane-auth addon module, I think they can work similarly to how ember-simple-auth works, in that they simply reside at the same level as sane-auth, and aren't a hierarchy. something like:
{
"devDependencies": {
"sane-auth": "*",
"sane-auth-social-core": "*",
"sane-auth-social-twitter": "*",
"sane-auth-social-facebook": "*"
}
}
I tend to think sane- is a good prefix for sake of discovery, but it is true that the keyword serves that purpose as well as install
This could potentially be sub-plugins or be installed via flags:
sane install sane-auth --social
. There should definitely be some way to turn it on/off.Or we can just have multiple generators, now that I think about it: So
sane install sane-auth
runssane generate sane-auth
which adds the basic authentication. Then we have two moresane generate sane-auth-social
andsane generate sane-auth-user-roles
which add their respective additional functionality. (Thesane-auth
namespacing would happen automatically based on the addon-name)That actually does bring another issue up, naming and 'namespacing' of the generators. Right now only
sane-addon
is required in the keywords. But should we also have some conventions for generator names? For example we could actually remove the 'sane-' here, so it would just besane g auth
(as well assane g auth-social
, etc.) and you could runsane i auth
and it would first look forsane-auth
. But this could also cause issues in the future if we are not completely clear and strict about it.I am also thinking here how the
ember-cli
ecosystem works. 90% of the addons haveember-cli
in front, but some likeliquid-fire
do not. And we should not restrict naming at least.What do you think?
@kriswill you had an idea about that as well I believe?