Closed MartijnR closed 5 months ago
PS. don't approve and merge this as it still requires more work. It is just useful to show the approach for now.
There is a failing test (enketo-core web) that I cannot reproduce locally. For now, it's okay to ignore and ready for review.
I'll add the other PRs on top of this one, so please review the PRs in order.
@kkrumlian, @gushil, @pbowen-oc, as discussed, here is an example (an exceptionally nice one tbh) to demonstrate the kind of refactoring I propose to do in the monorepo.
The previous approach was taken to be able to keep using the official enketo-core npm module without forking it. This is no longer required with the monorepo.
Advantages:
enketo/enketo
updates this function in the enketo-core packageenketo/enketo
. If an existing function is customized, the customization shows where it occurs (instead of somewhere else).Disadvantage:
When refactoring is done the whole
page.js
file in enketo-express would be removed as all its customizations would have moved to enketo-core.