ember-cli / ember-cli-update

Update Ember CLI projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature request: hierarchal blueprint support or dependent blueprint support

gitstevenpham opened this issue · comments

@elwayman02 and I were discussing this and I wanted to capture the essence of our conversation in this feature request.

Jordan has a use case where he wants to write a blueprint for the collection of Ember addon projects his team maintains. The thing is though he needs another addon's blueprint to be generated before running his blueprint so that it can layer changes on top of that. From my understanding of the ember-cli-update codebase, it will only install and generate one blueprint per run.

Some of the conversation items we had were:

  • How will version management work for dependent packages containing the blueprints?
  • How should the dependencies be defined?
  • How will ember-cli-update prompt for updates

To give more context - Let's say that we have a custom blueprint that provides additional project boilerplate on top of the base Ember blueprints, including making changes that undo or alter some of the changes in the base blueprint (e.g. different linting config, changing LICENSE.md, etc). This blueprint exists for a team or org to generate new projects specific to their infrastructure and the way they write code, in the same vein as why the base Ember blueprint exists. Whenever a new version of Ember is released, the base blueprint may change in ways that require further changes to be made to this second blueprint, particularly if the new changes conflict with some of the alterations made in the custom blueprint. When upgrading a project to the new version of Ember, we would want to run the base blueprint and the custom blueprint together, applying them as a net set of changes.

As it stands right now, I believe you would have to run the base blueprint, commit those changes, and then run the custom blueprint separately and have it undo some of those committed changes in a second commit. The question is, can we make this more ergonomic for consumers of ember-cli-update who have use-cases like this?

This seems like something that could be added to ember-cli-update.json; a blueprint dependency list for a given blueprint.

This seems like something that could be added to ember-cli-update.json; a blueprint dependency list for a given blueprint.

Ya, agreed.