const gulp   = require('gulp');
const config = require('../config');

var watch;

try {
    watch = require('gulp-watch');
} catch(e) { }

if (watch)
{
   gulp.task('watch', function(callback)
    {
        watch(config.sass.watchablePath, function() { gulp.start('sass'); });
        watch(config.js.watchablePath, function() { gulp.start('js'); });
        watch(config.images.watchablePath, function() { gulp.start('images'); });
        watch(config.fonts.watchablePath, function() { gulp.start('fonts'); });
    });
}
