В целом он следит и обновляет, но если прописать ({ stream: true }), то он перестает отслеживать файлы стилей. В чем может быть проблема?
var gulp = require('gulp'),
browsersync = require('browser-sync'),
rsync = require('gulp-rsync');
gulp.task('rsync', function() {
return gulp.src('app/**')
.pipe(rsync({
root: 'app/',
hostname: 'username@yousite.com',
destination: 'yousite/public_html/',
// include: ['*.htaccess'], // Includes files to deploy
exclude: ['**/Thumbs.db', '**/*.DS_Store'], // Excludes files from deploy
recursive: true,
archive: true,
silent: false,
compress: true
}))
});
gulp.task('watch', ['browser-sync'], function() {
gulp.watch('catalog/view/theme/moneymaker2/stylesheet/*.css', browserSync.reload({ stream: true }));
gulp.watch('catalog/view/theme/moneymaker2/template/**/*.tpl', browserSync.reload);
});
gulp.task('browser-sync', function() {
browsersync.init({
proxy: "podgoroy.loc",
notify: false
});
});
gulp.task('default', ['watch']);
[16:56:54] Using gulpfile C:\OSPanel\domains\podgoroy.loc\gulpfile.js
[16:56:54] Starting 'browser-sync'...
[16:56:55] Finished 'browser-sync' after 181 ms
[16:56:55] Starting 'watch'...
[16:56:55] 'watch' errored after 264 μs
[16:56:55] ReferenceError: browserSync is not defined
at Gulp. (C:\OSPanel\domains\podgoroy.loc\gulpfile.js:25:64)
at module.exports (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\index.js:214:10)
at C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\index.js:279:18
at finish (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\lib\runTask.js:21:8)
at module.exports (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\lib\runTask.js:60:3)
at Gulp.Orchestrator._runTask (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (C:\OSPanel\domains\podgoroy.loc\node_modules\orchestrator\index.js:134:8)
[Browsersync] Proxying:
podgoroy.loc
[Browsersync] Access URLs:
------------------------------------
Local:
localhost:3000
External:
172.20.10.4:3000
------------------------------------
UI:
localhost:3001
UI External:
172.20.10.4:3001