Skip to content

Commit

Permalink
Use Gulp to copy files (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Dec 12, 2023
1 parent be419bc commit 4c13a8a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
9 changes: 4 additions & 5 deletions tasks/assets.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path'

import { files, task } from '@govuk-frontend/tasks'
import { task } from '@govuk-frontend/tasks'
import gulp from 'gulp'

/**
Expand All @@ -11,9 +11,8 @@ import gulp from 'gulp'
export const assets = (options) =>
gulp.series(
task.name('copy:assets', () =>
files.copy('**/*', {
srcPath: join(options.srcPath, 'govuk/assets'),
destPath: join(options.destPath, 'govuk/assets')
})
gulp
.src(join(options.srcPath, 'govuk/assets/**/*'))
.pipe(gulp.dest(join(options.destPath, 'govuk/assets')))
)
)
9 changes: 4 additions & 5 deletions tasks/build/package.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { join } from 'path'

import { paths } from '@govuk-frontend/config'
import { files, npm, task } from '@govuk-frontend/tasks'
import { npm, task } from '@govuk-frontend/tasks'
import gulp from 'gulp'

import { assets, fixtures, scripts, styles, templates } from '../index.mjs'
Expand All @@ -25,9 +25,8 @@ export default (options) =>

// Copy GOV.UK Prototype Kit JavaScript
task.name("copy:files 'govuk-prototype-kit'", () =>
files.copy('**/*.js', {
srcPath: join(options.srcPath, 'govuk-prototype-kit'),
destPath: join(options.destPath, 'govuk-prototype-kit')
})
gulp
.src(join(options.srcPath, 'govuk-prototype-kit/**/*.js'))
.pipe(gulp.dest(join(options.destPath, 'govuk-prototype-kit')))
)
)
7 changes: 3 additions & 4 deletions tasks/build/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export default (options) =>

// Copy GOV.UK Frontend static assets
task.name('copy:assets', () =>
files.copy('**/*', {
srcPath: join(options.srcPath, 'govuk/assets'),
destPath: join(options.destPath, 'assets')
})
gulp
.src(join(options.srcPath, 'govuk/assets/**/*'))
.pipe(gulp.dest(join(options.destPath, 'assets')))
),

// Compile GOV.UK Frontend JavaScript
Expand Down
9 changes: 4 additions & 5 deletions tasks/templates.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path'

import { files, task } from '@govuk-frontend/tasks'
import { task } from '@govuk-frontend/tasks'
import gulp from 'gulp'

/**
Expand All @@ -11,9 +11,8 @@ import gulp from 'gulp'
export const templates = (options) =>
gulp.series(
task.name('copy:templates', () =>
files.copy('**/*.{md,njk}', {
srcPath: join(options.srcPath, 'govuk'),
destPath: join(options.destPath, 'govuk')
})
gulp
.src(join(options.srcPath, 'govuk/**/*.{md,njk}'))
.pipe(gulp.dest(options.destPath))
)
)

0 comments on commit 4c13a8a

Please sign in to comment.