forked from GoogleChrome/workbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatch.js
More file actions
29 lines (25 loc) · 759 Bytes
/
watch.js
File metadata and controls
29 lines (25 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
const gulp = require('gulp');
const logHelper = require('../infra/utils/log-helper');
gulp.task('watch', gulp.series(
'build',
() => {
gulp.watch(
[
`packages/${global.packageOrStar}/**/*.mjs`,
'!packages/**/_version.mjs',
'!packages/**/build/**/*',
'!packages/**/node_modules/**/*',
], gulp.series('build'),
)
.on('error', () => {})
.on('change', function(path, stats) {
logHelper.log(`gulp.watch() was triggered by '${path}'`);
});
}
));