aem-boilerplate icon indicating copy to clipboard operation
aem-boilerplate copied to clipboard

Minimal plugin system

Open ramboz opened this issue 2 years ago • 2 comments

Use case

As a developer, I'd like to have a minimal plugin system so that I can organize common features into individual opt-in plugins that I can re-use across projects, so that my scripts.js is easier to maintain, my code more portable and re-usable, and so that I only load what is really needed for my use case.

In particular, I'd like to:

  • have a simple instrumentation of my scripts.js for the plugins I use
  • have the capability to pass down configuration settings to the plugin to tailor it for my project
  • be able to define various "hooks" in my plugin so it automatically runs in the eager/lazy/delayed phases
  • be able to reference another plugin from my plugin so I can re-use features

ramboz avatar Oct 19 '22 17:10 ramboz

Hre is a first proposal on this idea: https://github.com/adobe/helix-project-boilerplate/pull/135

ramboz avatar Oct 20 '22 07:10 ramboz

Proposal was merged in the forked repo at https://github.com/ramboz/helix-project-boilerplate/ with a bit of documentation at https://github.com/ramboz/helix-project-boilerplate/wiki

ramboz avatar Jan 16 '23 06:01 ramboz