mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
dev: fix gulp-watch cpu usage
This commit is contained in:
10
gulpfile.js
10
gulpfile.js
@@ -46,7 +46,10 @@ const common = {
|
||||
},
|
||||
|
||||
keepSyncResourceFile () {
|
||||
return gulp.watch(resourceFilePath, { ignoreInitial: true }, common.syncResourceFile)
|
||||
return gulp.watch(resourceFilePath, {
|
||||
ignoreInitial: true,
|
||||
usePolling: false // Don't know why but have to set explicitly, or high cpu usage
|
||||
}, common.syncResourceFile)
|
||||
},
|
||||
|
||||
syncAllStatic () {
|
||||
@@ -67,7 +70,10 @@ const common = {
|
||||
return gulp.watch([
|
||||
path.join(outputPath, 'js/**'),
|
||||
path.join(outputPath, 'css/**')
|
||||
], { ignoreInitial: true }, common.syncJS_CSSinRt)
|
||||
], {
|
||||
ignoreInitial: true,
|
||||
usePolling: false // Don't know why but have to set explicitly, or high cpu usage
|
||||
}, common.syncJS_CSSinRt)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user