var express = require('express');
var livereload = require('connect-livereload');
var app = express();
app.use(livereload({ port: 35729 }));
gulp.task('watch', function () {
var gutil = require('gulp/node_modules/gulp-util');
var errLogger = function () {
gutil.log(gutil.colors.red.apply(undefined, arguments));
};
var app = require('gulp-express2')('app.js', gutil.log, errLogger);
app.run();
gulp.watch([
'app.js'
]).on('change', function (file) {
app.run();
setTimeout(function () {
app.notify(file);
}, 1000);
});
gulp.watch([
'assets/**/*.js'
]).on('change', function (file) {
gulp.start('scripts');
app.notify(file);
});
gulp.watch([
'assets/**/*.less'
]).on('change', function (file) {
gulp.start('less');
app.notify(file);
});
});