Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow individual script imports #1472

Merged
merged 7 commits into from
May 21, 2020
Merged

Allow individual script imports #1472

merged 7 commits into from
May 21, 2020

Commits on May 21, 2020

  1. Attach GOVUKFrontend modules to GOVUK.Modules

    Adds missing scripts from govuk-frontend (button, header and tabs) and attach all GOVUKFrontend modules to GOV.Modules. Unfortunately, the UMD files imported from govuk-frontend are wrapped/exposed as a `GOVUKFrontend` variable (both when exporting the entire library and when exporting individual scripts), this being the reason for using `= window.GOVUKFrontend`, which could be rather confusing.
    alex-ju committed May 21, 2020
    Configuration menu
    Copy the full SHA
    c27b692 View commit details
    Browse the repository at this point in the history
  2. Update modules script to work with any module type

    Previously the modules script was dealing only with GOV.UK Frontend Toolkit and GOV.UK Publishing scripts. It now handles GOV.UK Frontend modules initialisation too. This means we don't need to call `GOVUKFrontend.initAll` anymore, but we replace this with an empty function for backwards compatibility (othwerwise it will cause a hard error on projects calling this function)
    alex-ju committed May 21, 2020
    Configuration menu
    Copy the full SHA
    0a11a1a View commit details
    Browse the repository at this point in the history
  3. Remove redundant script imports

    When we decided to initialise all govuk-frontend components at once (92bef7e) we added all scripts on top of the existing imports at the components level. This commit removes the redundant import, similarly with #1331 for SCSS.
    alex-ju committed May 21, 2020
    Configuration menu
    Copy the full SHA
    0e6da01 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7377bc1 View commit details
    Browse the repository at this point in the history
  5. Add suggested script imports

    alex-ju committed May 21, 2020
    Configuration menu
    Copy the full SHA
    477dae1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5206b13 View commit details
    Browse the repository at this point in the history
  7. Update CHANGELOG.md

    alex-ju committed May 21, 2020
    Configuration menu
    Copy the full SHA
    c7f05aa View commit details
    Browse the repository at this point in the history