1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/gulp/watch.js

34 lines
1019 B
JavaScript
Raw Normal View History

2014-08-29 00:40:18 +03:00
var gulp = require('gulp');
//var livereload = require('gulp-livereload');
var paths = require('./paths.js');
require('./jshint.js');
require('./handlebars.js');
require('./less.js');
require('./copy.js');
2015-02-03 03:18:45 +02:00
require('./webpack.js');
2014-08-29 00:40:18 +03:00
2015-02-03 03:18:45 +02:00
gulp.task('watch', ['jshint', 'handlebars', 'less','copyHtml', 'copyContent','copyJs'], function () {
gulp.start('webpackWatch');
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint','copyJs']);
2014-08-29 00:40:18 +03:00
gulp.watch(paths.src.templates, ['handlebars']);
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
2015-01-26 04:03:21 +02:00
gulp.watch([paths.src.html], ['copyHtml']);
2014-08-29 00:40:18 +03:00
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
});
2015-02-03 03:18:45 +02:00
gulp.task('liveReload', ['jshint', 'handlebars', 'less', 'webPack'], function () {
2014-08-29 00:40:18 +03:00
var server = livereload();
gulp.watch([
'app/**/*.js',
'app/**/*.css',
2015-01-26 04:03:21 +02:00
'app/index.html',
'app/login.html'
2014-08-29 00:40:18 +03:00
]).on('change', function (file) {
server.changed(file.path);
});
2015-01-26 04:03:21 +02:00
});