diff --git a/templates/common/root/_gulpfile.js b/templates/common/root/_gulpfile.js index 8e6783ee9..9bda49ca2 100644 --- a/templates/common/root/_gulpfile.js +++ b/templates/common/root/_gulpfile.js @@ -89,7 +89,10 @@ gulp.task('start:server', function() { root: [yeoman.app, '.tmp'], livereload: true, // Change this to '0.0.0.0' to access the server from outside. - port: 9000 + port: 9000, + middleware: function (connect) { + return [connect().use('/bower_components', connect.static('bower_components'))]; + } }); }); @@ -97,7 +100,10 @@ gulp.task('start:server:test', function() { $.connect.server({ root: ['test', yeoman.app, '.tmp'], livereload: true, - port: 9001 + port: 9001, + middleware: function (connect) { + return [connect().use('/bower_components', connect.static('bower_components'))]; + } }); }); @@ -107,6 +113,10 @@ gulp.task('watch', function () { .pipe(styles()) .pipe($.connect.reload()); + $.watch(paths.views.main) + .pipe($.plumber()) + .pipe($.connect.reload()); + $.watch(paths.views.files) .pipe($.plumber()) .pipe($.connect.reload()); @@ -153,10 +163,10 @@ gulp.task('test', ['start:server:test'], function () { gulp.task('bower', function () { return gulp.src(paths.views.main) .pipe(wiredep({ - directory: yeoman.app + '/bower_components', + directory: 'bower_components', ignorePath: '..' })) - .pipe(gulp.dest(yeoman.app + '/views')); + .pipe(gulp.dest(yeoman.app)); }); ///////////