Skip to content

Suggestion: New way to register plugins #654

@joshvanallen

Description

@joshvanallen

In Vue2, it was very easy to add plugins as there was a Vue global instance to use. This is no longer the case in Vue 3 so might be worth looking at a different approach to inquirer-gui plugin registration.

An idea I had was to follow something like Pinia's approach where there's a create function that returns a plugin object to add additional form plugins.

So it may work something like the following:

const inquirerGui = createInquirerGui()

inquirerGui.use(AutocompletePlugin)

app.use(inquirerGui);

No need to find the form instance to register the plugin. everything can be done at the top level of the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions