diff --git a/gulpfile.js/config.js b/gulpfile.js/config.js index eb525272..bcad9056 100644 --- a/gulpfile.js/config.js +++ b/gulpfile.js/config.js @@ -39,5 +39,16 @@ module.exports = { 'node_modules/font-awesome/css/font-awesome.css' ], app: 'babyblotter/static_site/scss/babyblotter.scss' + }, + watchConfig: { + scriptsGlob: [ + '**/static/js/**/*.js', + 'babyblotter/static_site/js/**/*.js', + '!babyblotter/static/js/' + ], + stylesGlob: [ + '**/static/scss/**/*.scss', + 'babyblotter/static_site/scss/**/*.scss' + ] } }; diff --git a/gulpfile.js/tasks/watch.js b/gulpfile.js/tasks/watch.js index 55a2ed05..3b3087ae 100644 --- a/gulpfile.js/tasks/watch.js +++ b/gulpfile.js/tasks/watch.js @@ -1,19 +1,14 @@ var gulp = require('gulp'); +var watchConfig = require('../config.js').watchConfig; + gulp.task('watch', ['watch:scripts', 'watch:styles']); gulp.task('watch:scripts', function() { - return gulp.watch([ - '**/static/js/**/*.js', - 'babyblotter/static_site/js/**/*.js', - '!babyblotter/static/js/' - ], ['scripts:app']); + return gulp.watch(watchConfig.scriptsGlob, ['scripts:app']); }); gulp.task('watch:styles', function() { - return gulp.watch([ - '**/static/scss/**/*.scss', - 'babyblotter/static_site/scss/**/*.scss' - ], ['styles:app']); + return gulp.watch(watchConfig.stylesGlob, ['styles:app']); });