Conversation
|
@ef4 Thanks. I generally like the proposed API. Am I reading this PR correctly to be an addition to the I'd like to review some real world deploy config files and see how they would change based on this. Also, if we decide that we want to merge this for the approaching 0.6.0 beta, we'll need a docs PR to go along with this, which can be PR'd against #335. @achambers @duizendnegen @ghedamat thoughts? |
|
Yes, I think we should also deprecate the |
|
Hm, the other function provided by the |
|
not used the |
|
thanks for this @ef4, it looks great! a few comments
currently I know that this happens in and possibly other plugins (feel free to edit the list)
|
|
Awesome work @ef4. Thanks. I'm happy with the proposed API once we include the ability to alias plugins. One question that comes to mind is, if I have quite a few plugins listed, could it become confusing to me to see the order in which things will run if I have One of the suggestions in #307 was that the Not saying that that way is better, I like your approach. Just wondering if this is something we need to consider. |
|
FYI, we're going to target this for 0.7 since we've got some things to work out with it still and 0.6.x is ready for beta. |
|
@ef4 thanks again for this! do you have any spare cycles and/or need input from us to take it to completion? otherwise we can try to take it over from here if that's easier, you did all the hard work already :D |
|
I haven't had spare cycles lately, feel free to jump in if you are able to help sooner. The piece that still needs to be done is a new aliasing API. I think it should look like: ENV.alias = [
// This will cause the build module to run twice, looking
// up its config under the two given names
{ module: 'build', as: ['desktop-build' , 'mobile-build']},
// If you want the original name to still be available too,
// it should be included in the list. This will run s3 twice,
// once using the config under "s3" and once under "special-s3"
{ module: 's3', as: ['s3', 'special-s3' ] },
// a singleton should also be accepted and automatically
// expanded to a list of length one
{ module: 'foo', as: 'bar' }
]; |
|
sounds good! I'll see if some of us can take it to completion and we'll then ping you for review! |
|
I'll adopt this adorable child. |
|
Ok, some great discussion here. After chatting with @ghedamat today, I'm going to assume custody of this little rascal from @lukemelia so we can try and get this over the line for Ember Camp. The one thing that wasn't addressed, aliasing of plugins, seems to have a reasonable solution proposed above by @ef4. I'm happy with all of the above however I have one or two thoughts:
Inline
|
|
For me to remember
|
This closes #307 with the following replacement for the hard-to-use `plugins` list: - the user can disable individual plugins by setting `disabled: true` on each plugin's config entry. - the user can influence plugin order by expressing inter-plugin dependencies with `runBefore` and `runAfter` on each plugin's config entry. - plugin authors can influence plugin order by expressing inter-plugin dependencies by setting `runBefore` and `runAfter` propreties directly on their plugin instance.
3f6ac06 to
c9a42d6
Compare
|
|
||
| /** | ||
| * Build up a hash of plugin instance execution order overrides. | ||
| * This hash will only container an entry for instances that should run in a particular order. All other instances will be ordered by their natural |
c9a42d6 to
56a4980
Compare
56a4980 to
656ebde
Compare
|
@lukemelia Aaron is pretty much done here and I already tested in my demo app if you can give it for a quick spin I'd say we're good to merge and cut the first beta :D |
|
Worked like a charm. New config is far more pleasant for my use case. Thanks @achambers! |
|
🎆 🎆 🎆 🎆 🎆 🎆 🎆 🎆 |
This closes #307 with the following replacements for the hard-to-use
pluginslist:the user can disable individual plugins by setting
disabled: trueon each plugin's config entry.the user can influence plugin order by expressing inter-plugin dependencies with
runBeforeandrunAfteron each plugin's config entry.plugin authors can influence plugin order by expressing inter-plugin dependencies by setting
runBeforeandrunAfterproperties directly on their plugin instance.Backward compatibility issues: this change reserves the properties
disabled,runBefore, andrunAfterfor use in each plugin's configuration entry. If any plugin is already using them, it will result in a conflict. I think this is worth it for the user ergonomics. However, an alternative solution would be to move all of these settings to a separate top-level property, like:ENV.disabled = { somePlugin: true }andENV.order = { somePlugin: { before: 's3' } }.