Skip to content

Create a Plugin manager #4

@adierkens

Description

@adierkens

Often times with the tapable interface used projects, they are paired with a set of plugins.

By default we typically just construct a list of them, and apply() them onto the main entry to the library:

class MyThing {
  constructor(conf: { plugins: Array<Plugin> }) {
     conf.plugins.forEach(p => p.apply(this));
  }
}

This works fine for most use-cases, but as projects grow there are often needs for plugins to communicate with each other. It would be helpful to create a manager that handles all of the register, find, applyTo calls for a set of plugins and be able to reuse that across multiple projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions