Обновляются только стили. В чем проблема? Вот код gulpile.js
var gulp = require('gulp');
var cssmin = require('gulp-cssmin');
var sass = require('gulp-sass');
var rigger = require('gulp-rigger');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
var connectPHP = require('gulp-connect-php');
var reload = browserSync.reload;
var url = 'das-elite.loc'
gulp.task('default', ['browser-sync','sass-dev', 'dev-watch']);
gulp.task('browser-sync', ['php-reload'], function() {
browserSync.init({
proxy: url
});
});
gulp.task('dev-watch', function() {
gulp.watch('./src/sass/**/*.scss', ['sass-dev'])
gulp.watch(url+'/**/*.php', ['php'])
gulp.watch(url+'/**/*.js', [reload]);
})
gulp.task('sass-dev', function() {
return gulp.src('./src/sass/main.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({browsers: ['last 15 versions'],cascade: false}))
.pipe(cssmin())
.pipe(gulp.dest('../web/css'))
.pipe(reload({stream: true}))
})
gulp.task('php', function() {
return gulp.src(url+'/**/*.php')
.pipe(reload({stream: true}))
})
gulp.task('js', function() {
return gulp.src(url+'/**/*.js')
.pipe(reload({stream: true}))
})
gulp.task('php-reload', function() {
return connectPHP.server();
})