Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ember-cli] Ability to hook into build process without addons #530

Closed
mehulkar opened this issue Aug 26, 2019 · 1 comment
Closed

[ember-cli] Ability to hook into build process without addons #530

mehulkar opened this issue Aug 26, 2019 · 1 comment

Comments

@mehulkar
Copy link
Contributor

I should be able to hook into the Ember build process without needing an addon. Something like this:

new EmberApp({
  treeFor() {
  }
})

Not totally sure how this would work or the semantics, but I would like a lightweight way to affect the broccoli tree. I suspect that somewhere in the process of calling the hooks for all addons, these hooks from the EmberApp definition could also be called pretty easily.

There was some discussion in Discord #ember-cli about in-repo addons being used for this case, but IMO in-repo addons do more harm than good:

  1. They give developers the illusion that lib code is not owned by the project / shouldn't be touched.
  2. It's not entirely clear how to configure tests of lib code to run in the normal test suite
  3. They make it easy to go half-way to creating good abstractions that can actually be shared

Secondly, providing these hooks would allow developers to gradually build good build time abstractions: (1) inline in build file (2) in-repo addon (3) external addon.

@mehulkar
Copy link
Contributor Author

Opened #578 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant