getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
218 stars 48 forks source link

Run "register" when discovering plugins. #327

Closed tokejepsen closed 6 years ago

tokejepsen commented 6 years ago

Problem

Currently you can't generate multiple plugins with code.

Solution

When discovering plugins through environment variables, if register is found in a module then run it.

The use case is to generate multiple actions dynamically when the Launcher discovers its plugins.

tokejepsen commented 6 years ago

Turns out this behaviour is not suited for the core.

It diluted the methods in the core, and makes it harder to work with in other apps.