mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added support for live reload
This commit is contained in:
parent
5af12b67be
commit
760469fc5f
6 changed files with 42 additions and 51 deletions
|
@ -1,6 +1,5 @@
|
|||
var gulp = require('gulp');
|
||||
//var livereload = require('gulp-livereload');
|
||||
|
||||
var livereload = require('gulp-livereload');
|
||||
|
||||
var paths = require('./paths.js');
|
||||
|
||||
|
@ -10,24 +9,12 @@ require('./less.js');
|
|||
require('./copy.js');
|
||||
require('./webpack.js');
|
||||
|
||||
|
||||
gulp.task('watch', ['jshint', 'handlebars', 'less','copyHtml', 'copyContent','copyJs'], function () {
|
||||
gulp.start('webpackWatch');
|
||||
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint','copyJs']);
|
||||
gulp.watch(paths.src.templates, ['handlebars']);
|
||||
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
|
||||
gulp.watch([paths.src.html], ['copyHtml']);
|
||||
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
|
||||
});
|
||||
|
||||
gulp.task('liveReload', ['jshint', 'handlebars', 'less', 'webPack'], function () {
|
||||
var server = livereload();
|
||||
gulp.watch([
|
||||
'app/**/*.js',
|
||||
'app/**/*.css',
|
||||
'app/index.html',
|
||||
'app/login.html'
|
||||
]).on('change', function (file) {
|
||||
server.changed(file.path);
|
||||
});
|
||||
});
|
||||
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyHtml', 'copyContent', 'copyJs'], function () {
|
||||
livereload.listen();
|
||||
gulp.start('webpackWatch');
|
||||
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint', 'copyJs']);
|
||||
gulp.watch(paths.src.templates, ['handlebars']);
|
||||
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
|
||||
gulp.watch([paths.src.html], ['copyHtml']);
|
||||
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue