Replies: 4 comments 1 reply
-
Adding this one for inspiration: Which is the usual And this one for an other example of "plugin registry": |
Beta Was this translation helpful? Give feedback.
-
Here's a few things I started thinking about to design the plugin system... Plugin types
But in the end, the type doesn't change much except for categorizing them (to list them in the docs). Plugin developmentOr how plugin developers will declare their plugins. Option 1 - Free for all
Option 2 - Programmatic approach
Option 3 - Declarative approach (manifest)
Plugin discoverabilityIn reality, we can easily use any plugins if they are in npm and that they follow a given pattern (e.g. Option 1 - Full npm registry
Option 2 - Minimal qwik registry
Option 3 - Full qwik registry
In terms of high level design, I honestly don't think there is much more to think about. Then it will depend on the chosen approaches (programmatic VS declarative, raw npm registry VS github repo VS full webapp). Personally I vote for the declarative approach (manifest) and the github repository. Depending on what others choose, I can start describing how the underlying solution will look like. |
Beta Was this translation helpful? Give feedback.
-
In terms of tooling I think the current support in the qwik cli is sufficient. For the registry, the safest way is having a repo that people submit PRs to. However the safety is still very minimal, because we're not going to vet every release of every plugin. A registry also speeds up lookups, allows grouping by type, and does some sanity filtering too. It also doesn't place limitations on the name, as long as the plugin configuration is in the package. |
Beta Was this translation helpful? Give feedback.
-
Thanks @ianlet ! I like the manifest approach, and having a repo or a registry file on the monorepo people can "PR" into. BTW, @dmitry-stepanenko I think you also had some thoughts about this right? |
Beta Was this translation helpful? Give feedback.
-
What is it about?
A way to expand Qwik without increasing core size
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
Any other context or information you want to share:
Proposed Solution / Feature
A Qwik plugin system.
Scanability
Every package in
node_modules
that starts with a specific convention likeqwik-
should be scanned for itsqwik-plugin-manifest.json
file which describes specific instructions of which files to copy, modify, etc.Extracting some of the existing plugins from core
Separating possible integrations as "maintained by core team" (anything under the QwikDev org) or "maintained by community" (anything under the QwikCommunity org) will allow the core team to take responsibility of fewer things but make sure they are always stable / maintained.
File management
We need to brainstorm how different types of plugins will look like (usually there is a difference between the types).
Plus, we would need to modify the Qwik CLI to be aware of external integrations so we could install or
add
them with ease (running their script).We would need to provide an infrastructure for copying new files and modifying existing files that are read from the plugin's manifest.
Discoverability
We need a way to list core plugins and community plugins in a searchable area under the Qwik docs
Links / References
Here are some examples for existing plugin systems from several projects:
https://docs.cypress.io/guides/component-testing/third-party-definitions
https://nx.dev/extending-nx/recipes/create-preset
Example for a "discover plugins" page -
Beta Was this translation helpful? Give feedback.
All reactions