mirror of https://github.com/snachodog/mybuddy.git
Add watchConfig for gulp watch.
This commit is contained in:
parent
10e87c27b5
commit
0f079c14fa
|
@ -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'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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']);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue