-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Watch the `govuk/assets` folder and re-run the assets task when there are changes. This means that changes to the assets folder are applied to the dist folder (and therefore are reflected in the review app) without having to manually run the `build:package` task.
- Loading branch information
Showing
4 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { join } from 'path' | ||
|
||
import { files, task } from 'govuk-frontend-tasks' | ||
import gulp from 'gulp' | ||
|
||
/** | ||
* Copy GOV.UK Frontend assets (for watch) | ||
* | ||
* @type {import('govuk-frontend-tasks').TaskFunction} | ||
*/ | ||
export const assets = (options) => gulp.series( | ||
task.name('copy:assets', () => | ||
files.copy('**/*', { | ||
srcPath: join(options.srcPath, 'govuk/assets'), | ||
destPath: join(options.destPath, 'govuk/assets') | ||
}) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters