In order to have a common setup in most of my Apostrophe projects, I plan on building some custom npm-modules to bundle them and add them to my projects. Some of the features I would like to do in them, appart from adding widgets and backend functionality, is editing official apostrophe modules' setup (e.g., setting up default page types for apostrophe-pages
) and overriding nunjuck blocks and/or templates.
Both things can easily be overwritten on a project-level configuration with Apostrophe's implicit subclassing mechanism, so my goal of sharing a common base setup for different projects could be achieved with a custom boilerplate, although I would lose the ability of upgrading my defaults by releasing new versions of my node modules.
All in all, I was thinking in a Maven-style dependency hierarchy like this:
Apostrophe npm modules <- custom npm modules <- project modules
Coming form a Java and Maven based CMS, I understand I will need to change my way of thinking in many things, so: is what I'm trying to do possible and does it make sense in the Apostrophe world? What would be "The Apostrophe Way" to achieve something like this? Do I need to create a custom npm module to with the moog option improve
for each module I want to extend?
Thanks in advance.