Skip to content

Refactor plugin system #20

@mitchellsimoens

Description

@mitchellsimoens

The plugin system that is currently in place is a bit too intimate with the current setup of the code base. I'd like to break things out, turn into an event based plugin system and their own node modules (once #18 is done).

For example, we can listen to events like:

this.listen('event:name', this.doSomething);

I like the colon delimited event name schema as it's self documenting. We can even have before and after to give some sort of order (before could cancel everything too):

this.listen('before:event:name', this.doSomethingBefore);
this.listen('after:event:name', this.doSomethingAfter);

And of course the plugins can register themselves to a manager. We can also either have a base plugin class or since typescript is being used can use decorators (tho some people hate decorators and wouldn't want to alienate them so support no decorators like done above or some other api).

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskA task to be done

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions