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 e441e038ea
commit 672d4cb6e9
5 changed files with 26 additions and 750 deletions

View File

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