Call blueprint's origin hook
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- tooling
Research direction
The issue names no files, tests, or entry points. Start by locating the blueprint lookup and hook-invocation implementation, then review the linked gist and the existing installation behavior. Done means a blueprint can call its origin hook while preserving the correct environment and allowing arguments to be changed.
Written by the indexing model from the issue text.
Description
Hi, considering this gist and its changes: https://gist.github.com/jgwhite/1e7871f886a9836c33d3/revisions
There is a need to "extend" blueprints in order to be able to easily change or extend the templates that the blueprints are using while not changing any installation logic (i.e. needed packages and the like). The current approach is to use `this.lookupBlueprint('name') and then call the appropriate method on it, like
afterInstall: function() {
return this.lookupBlueprint('name').afterInstall();
}
This currently can lead to errors if the parent blueprint invokes tasks like npm install because the context isn't correct. What would be nice is something like an origin method that does the exact same thing while taking care of the environment stuff.
someHook: function(options) {
return this.origin();
}
Simliar to this.super in ember.js it should take care of the arguments by itself. The method should still take arguments in order to be able to change them. I avoided the name super because its not actually the same concept as to call a "super" method.
If the need for calling different hooks from the origin there could be something like originInvoke()
someHook: function(options) {
return this.originInvoke("otherhook");
return this.invokeOnOirigin("otherhook");
return this.invokeOrigins("otherhook");
return this.callOrigins("otherhook");
}
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ember-cli/blprnt
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 3/5 1-2 days Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in ember-cli/blprnt
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[quality] useFocusTrap's Shift+Tab wrap and non-Tab/non-Escape key arms are never driven end to endPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/gh-aw-workshop#4220 ·
Maintainers usually reply within 1 day