Make use of JS Modules less confusing

It's not obvious how the code that includes JS
Modules in the frontend build works.

This adds lots of comments to explain the various
bits and flattens `modules/all.mjs` to just be a
single function that starts off the window.GOVUK
namespace.

Also removes `module/all.js` from the repo'. It's
an artefact used by the frontend build so
shouldn't be included as source code.
This commit is contained in:
Tom Byers
2019-11-19 14:57:49 +00:00
parent 0aa7b7c3cd
commit 549e167cc8
5 changed files with 26 additions and 750 deletions

View File

@@ -1,4 +1,4 @@
window.GOVUKFrontend.initAll();
window.GOVUK.Frontend.initAll();
$(() => GOVUK.addCookieMessage());