Skip to content

Commit

Permalink
Add the browserSync stream on gulpfile to the script and style tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielhsp committed Jan 17, 2018
1 parent 341cdda commit 4de2eda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ gulp.task('styles', () => {
.pipe(gulp.dest('./'))
.pipe($.rename(file => file.basename = file.basename.replace('.min', '')))
.pipe(gulp.dest('./'))
.pipe(browserSync.stream());
});

gulp.task('scripts', () => {
Expand Down Expand Up @@ -85,6 +86,7 @@ gulp.task('scripts', () => {
]
}))
.pipe(gulp.dest('build/'))
.pipe(browserSync.stream());
});

// Connect and start a local php server using gulp-connect-php
Expand All @@ -104,7 +106,7 @@ gulp.task('connect-sync', () => {
gulp.task('default', ['styles', 'scripts', 'connect-sync', 'watch']);

// Watch task - Use to watch change in your files and execute other tasks
gulp.task('watch', () => {
gulp.task('watch', ['styles', 'scripts'], () => {
gulp.watch([paths.js], ['scripts']);
gulp.watch([paths.scss], ['styles']);
});

0 comments on commit 4de2eda

Please sign in to comment.