[RFC] Extensibility - Basic Scaffold Plugins #179
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Related to issue #17
Summary of Changes
This idea shows how a single scaffold plugin can be used for meta instead of including it by default.
This could be extended to many other plugins fairly easily. This is simply the bare minimum PoC for an idea I discussed in issue #17. I'm putting this up to explore the issue and hear what others think.
MetaPlugin
which extends a base class ofGreenwoodPlugin
(hopefully a class we will use frequently for all our plugins with common functions)greenwood.config.js
within a plugins arrayconfig.js
is modified to accept the plugins keyscaffold.js
is modified to loop through all plugins and call thescaffold()
hook. This will need some hardening but this is just a proof of concept.another example where we could use this would be injecting webcomponents within a template that have been converted from markdown
createPageComponent()
in scaffold.js. That could simply become aMarkdownPlugin
.This will also be a great segue to headless CMS plugins.