Skip to content

Commit

Permalink
resolve #97 gulp watch on added files
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrius Zidonis committed Jun 7, 2018
1 parent 8d84b82 commit 6b2de5e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gulp-tasks/watch-all.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const gulp = require('gulp');

module.exports = function () {
var gulp = require('gulp');
gulp.start(['check-deps', 'watch-scss', 'watch-svg']);
};
3 changes: 2 additions & 1 deletion gulp-tasks/watch-htmlrender.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const gulp = require('gulp'),
watch = require('gulp-watch'),
runSequence = require('run-sequence').use(gulp),
config = require('../gulp.config.js')();

module.exports = function () {
gulp.watch(
watch(
config.html.src,
() => runSequence('html-render', 'live-reload')
);
Expand Down
3 changes: 2 additions & 1 deletion gulp-tasks/watch-images-optimize.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const gulp = require('gulp'),
watch = require('gulp-watch'),
runSequence = require('run-sequence').use(gulp),
config = require('../gulp.config.js')();

module.exports = function () {
gulp.watch(
watch(
config.optimize.images.src,
() => runSequence('image-optimization', 'live-reload')
);
Expand Down
3 changes: 2 additions & 1 deletion gulp-tasks/watch-scss.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const gulp = require('gulp'),
watch = require('gulp-watch'),
runSequence = require('run-sequence').use(gulp),
config = require('../gulp.config.js')();

module.exports = function () {
gulp.watch(
watch(
config.scss.src,
() => runSequence('compile-scss', 'live-reload')
);
Expand Down
3 changes: 2 additions & 1 deletion gulp-tasks/watch-svg.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const gulp = require('gulp'),
watch = require('gulp-watch'),
runSequence = require('run-sequence').use(gulp),
config = require('../gulp.config.js')();

module.exports = function () {
gulp.watch(
watch(
config.svg.sourceFolder + '**/*.svg',
() => runSequence('create-svg-sprite', 'live-reload')
);
Expand Down

0 comments on commit 6b2de5e

Please sign in to comment.