diff --git a/packages/govuk-frontend-review/tasks/watch.mjs b/packages/govuk-frontend-review/tasks/watch.mjs index 502deec321..d6e7c1102a 100644 --- a/packages/govuk-frontend-review/tasks/watch.mjs +++ b/packages/govuk-frontend-review/tasks/watch.mjs @@ -51,7 +51,8 @@ export const watch = (options) => */ task.name('lint:js watch', () => gulp.watch( - [join(options.srcPath, '**/*.{cjs,js,mjs}')], + join(options.srcPath, '**/*.{cjs,js,mjs}'), + { ignored: ['**/*.test.*'] }, gulp.parallel( // Run TypeScript compiler npm.script('build:types', ['--incremental', '--pretty'], options), diff --git a/packages/govuk-frontend/tasks/watch.mjs b/packages/govuk-frontend/tasks/watch.mjs index 6686d537c8..24428a791e 100644 --- a/packages/govuk-frontend/tasks/watch.mjs +++ b/packages/govuk-frontend/tasks/watch.mjs @@ -45,7 +45,8 @@ export const watch = (options) => */ task.name('lint:js watch', () => gulp.watch( - [join(options.srcPath, '**/*.{cjs,js,mjs}')], + join(options.srcPath, '**/*.{cjs,js,mjs}'), + { ignored: ['**/*.test.*'] }, gulp.parallel( // Run TypeScript compiler npm.script('build:types', ['--incremental', '--pretty'], options), @@ -62,7 +63,11 @@ export const watch = (options) => * JavaScripts build watcher */ task.name('compile:js watch', () => - gulp.watch([join(options.srcPath, '**/*.{cjs,js,mjs}')], scripts(options)) + gulp.watch( + join(options.srcPath, '**/*.{cjs,js,mjs}'), + { ignored: ['**/*.test.*'] }, + scripts(options) + ) ), /**