adobe/aem-boilerplate

Minimal plugin system

ramboz opened this issue · 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

Hre is a first proposal on this idea:
#135

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