Answer the question
In order to leave comments, you need to log in
gulp + browser sync. Why is stream not working?
In general, it keeps track and updates, but if you write ({ stream: true }), then it stops watching style files. What could be the problem?
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: '[email protected]',
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']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question