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

Read component data from built fixtures.json #4042

Merged
merged 4 commits into from
Aug 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shared/lib/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const getComponentFiles = (componentName = '') =>
getListing(
join(
packageNameToPath('govuk-frontend'),
`src/govuk/components/${componentName}/**/*`
`dist/govuk/components/${componentName}/**/*`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: are we're adding the requirement of reading from dist rather than src to ensure we read the list that's inside the package itself (and avoid potential missing components from older versions)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's the one, added an example in #4042 (comment)

)
)

Expand All @@ -136,7 +136,7 @@ const getComponentFiles = (componentName = '') =>
*/
const getComponentNames = async (filter) => {
const componentNames = await getDirectories(
join(packageNameToPath('govuk-frontend'), '**/src/govuk/components/')
join(packageNameToPath('govuk-frontend'), '**/dist/govuk/components/')
)

if (filter) {
Expand Down