Skip to content

Adopt GOV.UK Frontend packages structure #1217

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Apr 4, 2025

This PR adopts the directory structure from GOV.UK Frontend as part of:

It allows the nhsuk-frontend package to export multiple file formats or type declarations in future

govuk-frontend                // Repository root
├── ...
├── dist                      // Built files for use without npm
├── packages                  // Parent folder for packages
│   ├── govuk-frontend        // The GOV.UK Frontend package
│   │   ├── dist              // [Previously `/package`] Generated build files, not in version control, ships to npm
│   │   ├── src               // [Previously `/src`] Source files, in version control, not shipped to npm
│   │   ├── tasks             // Build, release and Gulp tasks for the GOV.UK Frontend Package 
│   │   ├── package.json      // Ensures dependencies of src, dist and tasks are in-sync
│   │   └── ...
│   ├── govuk-frontend-review // The Review App package
│   │   ├── dist              // Not in version control. Some tasks need the review app to build (tests, for example)
│   │   ├── src               // [Previously `app/src`] Source files for review app
│   │   ├── tasks             // Build and watch tasks for the review app
│   │   ├── package.json
│   │   └── ...
├── shared                    // Parent folder for packages shared across the monorepo 
│   ├── config                // [Previously `/config`] Stores config info like filepaths and ports
│   ├── helpers               // Helper functions for development
│   ├── lib                   // [Previously `/lib`] Shared libraries
│   └── tasks                 // [Previously `/tasks`] Shared tasks
├── src                       // Contains symlinks to new source file locations
└── package.json              // Workspaces configuration and top-level dependencies

@colinrotherham colinrotherham force-pushed the es-modules-gulp branch 2 times, most recently from 1d4eebb to f41dc5c Compare April 15, 2025 08:46
@colinrotherham colinrotherham force-pushed the es-modules-packages branch 2 times, most recently from 926f420 to eb7ef27 Compare April 15, 2025 08:53
@colinrotherham colinrotherham force-pushed the es-modules-gulp branch 2 times, most recently from 16bfc17 to 3d809cd Compare April 15, 2025 08:59
Base automatically changed from es-modules-gulp to main April 15, 2025 09:03
@colinrotherham colinrotherham changed the base branch from main to move-tests April 15, 2025 10:57
@colinrotherham colinrotherham force-pushed the move-tests branch 4 times, most recently from d4b1ec5 to 7e6d772 Compare April 16, 2025 16:26
Base automatically changed from move-tests to main April 22, 2025 12:24
@colinrotherham colinrotherham force-pushed the es-modules-packages branch 2 times, most recently from ebcb131 to 87a9b75 Compare April 22, 2025 13:37
@colinrotherham colinrotherham marked this pull request as ready for review April 22, 2025 13:42
@colinrotherham colinrotherham changed the base branch from main to package-exports April 25, 2025 08:10
@colinrotherham colinrotherham force-pushed the es-modules-packages branch 3 times, most recently from b587287 to e19b4fe Compare April 25, 2025 08:48
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
32.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@colinrotherham colinrotherham force-pushed the package-exports branch 2 times, most recently from b0728ee to e848ab0 Compare April 28, 2025 17:02
Base automatically changed from package-exports to main April 29, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update our file structure and build tooling to align with GOV.UK
2 participants