gulp watch fix

pull/3113/head
kayone 10 years ago
parent f4b8a636b9
commit 54bdc72ffa

@ -5,14 +5,15 @@ var cache = require('gulp-cached');
var paths = require('./paths.js');
gulp.task('copyJs', function () {
return gulp.src([paths.src.scripts])
.pipe(cache())
return gulp.src(paths.src.scripts)
.pipe(cache('copyJs'))
.pipe(print())
.pipe(gulp.dest(paths.dest.root));
});
gulp.task('copyIndex', function () {
return gulp.src(paths.src.index)
.pipe(cache())
.pipe(cache('copyIndex'))
.pipe(gulp.dest(paths.dest.root));
});

@ -7,7 +7,7 @@ var paths = require('./paths.js');
gulp.task('jshint', function () {
return gulp.src([paths.src.scripts, paths.src.exclude.libs])
.pipe(cache())
.pipe(cache('jshint'))
.pipe(jshint({
'-W030': false,
'-W064': false,

@ -1,12 +1,4 @@
module.exports = {
js: [
'./app/**/*.js',
'./src/**/*.js',
'!./**/libs/**',
'!./**/vendor/**',
'!./**/templates.js'
],
src: {
root: './src/UI/',
templates: './src/UI/**/*.hbs',

@ -10,7 +10,7 @@ require('./less.js');
require('./copy.js');
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyJs'], function () {
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyJs','copyIndex', 'copyContent'], function () {
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']);

Loading…
Cancel
Save