Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Call blueprint's origin hook

Open
#2 9 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ember-cli/blprnt

All issues in ember-cli/blprnt

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.