alphagov / govuk-frontend-docs

Technical documentation for GOV.UK Frontend
https://frontend.design-system.service.gov.uk/
36 stars 11 forks source link

gulpfile.js for v5.5.0 #458

Closed webfaqtory closed 3 months ago

webfaqtory commented 3 months ago

We are currently using GOV.‌UK Frontend v4.8.0 and use gulp to build our local SASS files. After upgrading to v5.5.0 and issuing gulp the assets task fails:

gulp.task('assets', function () {
  return gulp.src(themeDir + '/node_modules/govuk-frontend/govuk/assets/**/*')
    .pipe(gulp.dest(themeDir + '/assets'));
});

Is there an updated gulpfile.js for v5.5.0?

querkmachine commented 3 months ago

Hi @webfaqtory,

In GOV.UK Frontend 5.0.0 onwards the location of files within the npm package changed. Try updating the source path to include /dist like below.

gulp.task('assets', function () {
  return gulp.src(themeDir + '/node_modules/govuk-frontend/dist/govuk/assets/**/*')
    .pipe(gulp.dest(themeDir + '/assets'));
});

This was one of several breaking changes introduced in Frontend 5.0.0, read the release notes for a list of them all.

owenatgov commented 3 months ago

I'm closing this ticket on the basis that I believe @querkmachine has solved this query. @webfaqtory Please reopen this if the suggested change doesn't fix your build process.