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'); var paths = require('./paths.js');
gulp.task('copyJs', function () { gulp.task('copyJs', function () {
return gulp.src([paths.src.scripts]) return gulp.src(paths.src.scripts)
.pipe(cache()) .pipe(cache('copyJs'))
.pipe(print())
.pipe(gulp.dest(paths.dest.root)); .pipe(gulp.dest(paths.dest.root));
}); });
gulp.task('copyIndex', function () { gulp.task('copyIndex', function () {
return gulp.src(paths.src.index) return gulp.src(paths.src.index)
.pipe(cache()) .pipe(cache('copyIndex'))
.pipe(gulp.dest(paths.dest.root)); .pipe(gulp.dest(paths.dest.root));
}); });

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

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

@ -10,7 +10,7 @@ require('./less.js');
require('./copy.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.scripts, paths.src.exclude.libs], ['jshint', 'copyJs']);
gulp.watch(paths.src.templates, ['handlebars']); gulp.watch(paths.src.templates, ['handlebars']);
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']); gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);

Loading…
Cancel
Save