Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Extensibility - Basic Scaffold Plugins #179

Closed
wants to merge 1 commit into from

Conversation

hutchgrant
Copy link
Member

@hutchgrant hutchgrant commented Aug 22, 2019

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.

  1. Created a MetaPlugin which extends a base class of GreenwoodPlugin (hopefully a class we will use frequently for all our plugins with common functions)
  2. Imported that plugin into our greenwood.config.js within a plugins array
  3. config.js is modified to accept the plugins key
  4. scaffold.js is modified to loop through all plugins and call the scaffold() 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 a MarkdownPlugin.

This will also be a great segue to headless CMS plugins.

@hutchgrant hutchgrant changed the title feat: adding basic scaffold plugin idea [RFC] Extensibility - Basic Scaffold Plugins Aug 22, 2019
Copy link
Member

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for initiating this approach.

I had gone back and forth between class based vs functional API but thought class based would be a little too heavy.

I think it will be good to keep this around and compare to a functional approach as part of the steps outlined here and then we can review the pros and cons during a meeting.

@thescientist13
Copy link
Member

Created an issue for tracking this and will include it in our next project, as part of the data sources RFCs.
#209

@hutchgrant hutchgrant deleted the rfc/user-extensibility-17 branch October 13, 2019 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants