Answer the question
In order to leave comments, you need to log in
How to fix error in Gulp task file?
In gulpfile.js, I'm trying to create a test local server and set up live reload on it:
// Запуск сервера разработки gulp watch
gulp.task('watch', function() {
// Предварительная сборка проекта
gulp.run('stylus');
gulp.run('jade');
gulp.run('images');
gulp.run('js');
// Подключаем Livereload
server.listen(35729, function(err) {
if (err) return console.log(err);
gulp.watch('assets/stylus/**/*.styl', ['stylus']);
gulp.watch('assets/template/**/*.jade', ['jade']);
gulp.watch('assets/img/**/*', ['images'])
gulp.watch('assets/js/**/*', ['js'])
});
gulp.run('http-server');
});
gulp.task('watch', function () {
var server = ['jasmine', 'embed'];
var client = ['scripts', 'styles', 'copy', 'lint'];
gulp.watch('app/*.js', server);
gulp.watch('spec/nodejs/*.js', server);
gulp.watch('app/backend/*.js', server);
gulp.watch('src/admin/*.js', client);
gulp.watch('src/admin/*.css', client);
gulp.watch('src/geojson-index.json', ['copygeojson']);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question