2014-08-28 21:40:18 +00: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-01-26 02:03:21 +00:00
|
|
|
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyJs', 'copyHtml', 'copyContent'], function () {
|
2014-08-28 21:40:18 +00:00
|
|
|
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']);
|
2015-01-26 02:03:21 +00:00
|
|
|
gulp.watch([paths.src.html], ['copyHtml']);
|
2014-08-28 21:40:18 +00:00
|
|
|
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('liveReload', ['jshint', 'handlebars', 'less', 'copyJs'], function () {
|
|
|
|
var server = livereload();
|
|
|
|
gulp.watch([
|
|
|
|
'app/**/*.js',
|
|
|
|
'app/**/*.css',
|
2015-01-26 02:03:21 +00:00
|
|
|
'app/index.html',
|
|
|
|
'app/login.html'
|
2014-08-28 21:40:18 +00:00
|
|
|
]).on('change', function (file) {
|
|
|
|
server.changed(file.path);
|
|
|
|
});
|
2015-01-26 02:03:21 +00:00
|
|
|
});
|