diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index e5b0df9d..73b71339 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -16,9 +16,10 @@ var gulp = require('gulp'), pixrem = require('gulp-pixrem'), uglify = require('gulp-uglify'), imagemin = require('gulp-imagemin'), - exec = require('gulp-exec'), + exec = require('child_process').exec, runSequence = require('run-sequence'), - browserSync = require('browser-sync'); + browserSync = require('browser-sync').create(), + reload = browserSync.reload; // Relative paths function @@ -100,8 +101,8 @@ gulp.task('default', function() { gulp.task('watch', ['default'], function() { gulp.watch(paths.sass + '/*.scss', ['styles']); - gulp.watch(paths.js + '/*.js', ['scripts']); + gulp.watch(paths.js + '/*.js', ['scripts']).on("change", reload); gulp.watch(paths.images + '/*', ['imgCompression']); - gulp.watch('templates/*.html'); + gulp.watch(paths.templates + '/**/*.html').on("change", reload); }); diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index 2be4b50c..0c8af427 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -16,20 +16,19 @@ "pixrem": "~1.3.1", "time-grunt": "~1.2.1" {% elif cookiecutter.js_task_runner == 'Gulp' %} - "browser-sync": "^2.12.10", - "del": "^2.2.0", + "browser-sync": "^2.14.0", + "del": "^2.2.2", "gulp": "^3.9.1", - "gulp-autoprefixer": "^3.1.0", + "gulp-autoprefixer": "^3.1.1", "gulp-cssnano": "^2.1.2", - "gulp-exec": "^2.1.2", - "gulp-imagemin": "^3.0.1", + "gulp-imagemin": "^3.0.3", "gulp-pixrem": "^1.0.0", "gulp-plumber": "^1.1.0", "gulp-rename": "^1.2.2", - "gulp-sass": "^2.3.1", - "gulp-uglify": "^1.5.3", + "gulp-sass": "^2.3.2", + "gulp-uglify": "^2.0.0", "gulp-util": "^3.0.7", - "run-sequence": "^1.2.1" + "run-sequence": "^1.2.2" {% endif %} }, "engines": {