fix: Gulpfile Issue #738

This commit is contained in:
Parbhat Puri 2016-08-25 16:07:17 +05:30
parent 5f53ebe5f1
commit f5be5731cb
2 changed files with 12 additions and 12 deletions

View File

@ -16,9 +16,10 @@ var gulp = require('gulp'),
pixrem = require('gulp-pixrem'), pixrem = require('gulp-pixrem'),
uglify = require('gulp-uglify'), uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'), imagemin = require('gulp-imagemin'),
exec = require('gulp-exec'), exec = require('child_process').exec,
runSequence = require('run-sequence'), runSequence = require('run-sequence'),
browserSync = require('browser-sync'); browserSync = require('browser-sync').create(),
reload = browserSync.reload;
// Relative paths function // Relative paths function
@ -100,8 +101,8 @@ gulp.task('default', function() {
gulp.task('watch', ['default'], function() { gulp.task('watch', ['default'], function() {
gulp.watch(paths.sass + '/*.scss', ['styles']); 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(paths.images + '/*', ['imgCompression']);
gulp.watch('templates/*.html'); gulp.watch(paths.templates + '/**/*.html').on("change", reload);
}); });

View File

@ -16,20 +16,19 @@
"pixrem": "~1.3.1", "pixrem": "~1.3.1",
"time-grunt": "~1.2.1" "time-grunt": "~1.2.1"
{% elif cookiecutter.js_task_runner == 'Gulp' %} {% elif cookiecutter.js_task_runner == 'Gulp' %}
"browser-sync": "^2.12.10", "browser-sync": "^2.14.0",
"del": "^2.2.0", "del": "^2.2.2",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0", "gulp-autoprefixer": "^3.1.1",
"gulp-cssnano": "^2.1.2", "gulp-cssnano": "^2.1.2",
"gulp-exec": "^2.1.2", "gulp-imagemin": "^3.0.3",
"gulp-imagemin": "^3.0.1",
"gulp-pixrem": "^1.0.0", "gulp-pixrem": "^1.0.0",
"gulp-plumber": "^1.1.0", "gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-sass": "^2.3.1", "gulp-sass": "^2.3.2",
"gulp-uglify": "^1.5.3", "gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.7", "gulp-util": "^3.0.7",
"run-sequence": "^1.2.1" "run-sequence": "^1.2.2"
{% endif %} {% endif %}
}, },
"engines": { "engines": {