@mauritsvanrees @uroboro
Also sorry from my side about the late canceling of this PR. I'll close it then but keep the branch for mockup alive.
Additions to @mauritsvanrees outline above:
Yes, use plone.outputfilters master branch. (Typo: was plone.staticresources before)
Regarding the CMFPlone branch - this should not be needed. A registry entry like the following should be sufficient, as plone.outputfilters doesn't query the registry by interface but just by name (See: https://github.com/plone/plone.outputfilters/blob/7b2c5b1b4697c4d45b7eb2a01a07ca4666e30afa/plone/outputfilters/filters/resolveuid_and_caption.py#L58 ):
<record name="plone.image_captioning">
<value>True</value>
</record>
For the mockup changes - you could try to install plone.staticresources in Plone 5.1. It might fail but there are chances that it works. (I'm currently testing this and will let you know).
Update: no it doesn't. plone.staticresources has conflicting configuration options with Products.CMFPlone.
If not, let your project depend on the branch of mockup you're using and provide a custom plone-logged-in bundle. I do this for another project like so:
Provide a resource directory like so:
<plone:static
directory="resources"
name="my.site"
type="plone"
/>
A custom bundle resource with all the requirejs definitions you want to include:
<records
prefix="plone.resources/plone-logged-in"
interface="Products.CMFPlone.interfaces.IResourceRegistry">
<value key="js">++plone++my.site/plone-logged-in.js</value>
<value key="css">
<element>++plone++my.site/plone-logged-in.less</element>
</value>
</records>
A custom plone-logged-in bundle:
<records prefix="plone.bundles/plone-logged-in" interface="Products.CMFPlone.interfaces.IBundleRegistry">
<value key="last_compilation">2020-06-01 20:16:00</value>
<value key="jscompilation">++plone++my.site/plone-logged-in-compiled.min.js</value>
<value key="csscompilation">++plone++my.site/plone-logged-in-compiled.min.css</value>
<value key="develop_javascript">False</value>
<value key="develop_css">False</value>
<value key="merge_with">logged-in</value>
<value key="depends">plone</value>
<value key="resources">
<element>plone-logged-in</element>
</value>
<value key="enabled">True</value>
<value key="expression">python: member is not None</value>
<value key="stub_js_modules">
<element>backbone</element>
[...]
</value>
</records>
Then you can run ./plone-compile-resources -b plone-logged-in
and your bundle will be written to the directory which was defined for my.site
.
Note: you have to create the files for ++plone++my.site/plone-logged-in-compiled.min.js and ++plone++my.site/plone-logged-in-compiled.min.css even if they are empty otherwise plone-compile-resources will fail.