Plugins #58
Labels
A-plugins
Area: plugins system
C-docs
Category: documentation
C-enhancement
Category: enhancement
D-hard
Difficulty: hard
P-medium
Priority: medium
S-in-design
Status: in design
Is your feature request related to a problem? Please describe.
Right now, there's a large number of modifications to
.perseus/
(which all require ejecting) that could be modularized.Describe the solution you'd like
Perseus should have a plugins system with three types.
Type 1 plugins should provide functions that can be provided with extra information through
define_app!
. These functions will the be executed at various places in Perseus' engine. For example, a plugin could be created with this system that would add new routes to the inbuilt server, adding a GraphQL API with almost no configuration and no separate systems.Type 2 plugins would be more powerful, being able to modify files arbitrarily in addition to providing type 1 capabilities. An example use for this would be appending size optimizations to
.perseus/Cargo.toml
.Type 3 plugins would be the most powerful, as they would have their own entirely customizable
.perseus/
directories. Further, they'd issue instructions to the CLI that would set new commands to be run for different Perseus commands. For example, they might instructperseus serve
to also spin up extra servers and a database in parallel. These would be read from a specially named file in.perseus/
, and this would be done by stages. Then, an extra stage of completely custom executions could be added, which would preserve the CLI's own loaders and progress reporting system.Describe alternatives you've considered
Manual ejection in all cases, but this is very tedious, and doesn't lend itself to a highly customizable and collaborative open-source ecosystem.
Additional context
Types 1 and 2 should be ready for v0.3.0 when it goes stable (meaning more beta releases), but type 3 will be reserved until after that. However, CLI instructions would be very useful for ejections already, and that should be included.
This issue will track general progress for all aspects of the plugins system, which will improve Perseus dramatically by providing the customizability of v0.1.x with the convenience of v0.2.x and the power of x0.3.x.
The text was updated successfully, but these errors were encountered: