From 4fa9fbf3815dae0c6b1b32f8385d4c8815a87d24 Mon Sep 17 00:00:00 2001 From: Doug Fritz Date: Tue, 9 Sep 2014 13:56:24 -0700 Subject: [PATCH] add browser sync --- gulpfile.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 50a7160..66dce90 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -31,7 +31,25 @@ gulp.task( 'watch', [ 'default' ], function() { } ); -gulp.task( 'serve', [], function() { +gulp.task( 'reload', function() { + browserSync.reload(); +} ); + +gulp.task( 'dev', [ 'default', 'browser' ], function() { + + karma.server.start( { + frameworks: [ 'jasmine' ], + files: paths.test + } ); + + gulp.watch( paths.docs, [ 'docs', 'reload' ] ); + gulp.watch( paths.lint, [ 'lint', 'reload' ] ); + gulp.watch( paths.build, [ 'build', 'reload' ] ); + gulp.watch( paths.shim, [ 'shim', 'reload' ] ); + +} ); + +gulp.task( 'browser', [], function() { browserSync.init( null, { browser: [ 'google-chrome', 'google chrome' ], // linux uses the - server: {