/* ====================================
 *  gulpfile.js
 *  generated using generator-jetfire v0.1.5
 * ===================================== */

'use strict';

// Load plugins
var gulp = require('gulp'),
    jshint = require('gulp-jshint'),
    watch = require('gulp-watch'),
    livereload = require('gulp-livereload'),
    connect = require('gulp-connect'),
    notify = require('gulp-notify');

gulp.task('connect', function() {
  connect.server({
    root: 'app',
    port: '9000',
    livereload: true
  });
});

gulp.task('reload', function () {
  gulp.src('./app/*.html')
    .pipe(connect.reload())
    .pipe(notify({ message: 'Live reload complete!' }));
});

gulp.task('watch', function () {
  gulp.watch([
    './app/*.html',
    './app/styles/**/*.{css,less}',
    './app/scripts/**/*.{js,html}',
    './app/images/**/*.*'
  ], ['reload']);

  // Watch .js files
  gulp.watch([
    'app/scripts/**/*.js',
    'gulpfile.js',
    'Gruntfile.js'
    ], ['scripts']);

  // Create LiveReload server
  var server = livereload();
});

// Scripts
gulp.task('scripts', function() {
  return gulp.src([
      'app/scripts/**/*.js',
      'gulpfile.js',
      'Gruntfile.js'
    ])
    .pipe(jshint('.jshintrc'))
    .pipe(jshint.reporter('jshint-stylish'))
    .pipe(notify({ message: 'Scripts task complete!' }));
});

// Default task
gulp.task('default', ['connect', 'watch'], function() {
    gulp.start('scripts');
});

@@ -202,22 +202,27 @@
 '),%0A    
-jshint
+browserSync
  = requi
@@ -229,62 +229,28 @@
 re('
-gulp-jshint'),%0A    watch = require('gulp-watch
+browser-sync
 '),%0A    
 live
@@ -241,28 +241,24 @@
 sync'),%0A    
-live
 reload = req
@@ -258,47 +258,39 @@
 d = 
-require('gulp-live
+browserSync.
 reload
-')
 ,%0A    
-connect
+plugins
  = r
@@ -306,56 +306,62 @@
 ulp-
-connect'),%0A    notify = require('gulp-notify');%0A
+load-plugins')();%0A%0A// Watch Files For Changes & Reload
 %0Agul
@@ -368,23 +368,21 @@
 p.task('
-connect
+serve
 ', funct
@@ -388,325 +388,163 @@
 tion
+ 
 () %7B%0A  
-connect.server(%7B%0A    root: 'app',%0A    port: '9000',%0A    livereload: true%0A  %7D);%0A
+browserSync(%7B%0A    notify: false,%0A    server: %7B%0A      baseDir: %5B'.tmp', 'app'%5D%0A    %7D%0A  
 %7D);%0A%0A
+  
 gulp.
-task('reload', function () %7B%0A  gulp.src('./app/*.html')%0A    .pipe(connect.reload())%0A    .pipe(notify(%7B message: 'Live reload complete!' %7D));%0A%7D);%0A%0Agulp.task('watch', function () %7B%0A  gulp.watch(%5B%0A    './app/*.html',%0A    './
+watch(%5B'app/**/*.html'%5D, reload);%0A  gulp.watch(%5B'
 app/
@@ -559,122 +559,73 @@
 */*.
-%7B
 css
-,less%7D',%0A    './app/scripts/**/*.%7Bjs,html%7D',%0A    './app/images/**/*.*'%0A  %5D, %5B'reload'%5D);%0A%0A  // Watch .js files
+'%5D, reload);%0A  gulp.watch(%5B'app/styles/**/*.less'%5D, %5B'less'%5D);
 %0A  g
@@ -635,21 +635,16 @@
 .watch(%5B
-%0A    
 'app/scr
@@ -660,126 +660,64 @@
 .js'
-,%0A    'gulpfile.js',%0A    'Gruntfile.js'%0A    %5D, %5B'scripts
+%5D, %5B'jshint
 '%5D);%0A
-%0A
   
-// Create LiveReload server%0A  var server = live
+gulp.watch(%5B'app/images/**/*'%5D, 
 reload
-(
 );%0A%7D
@@ -723,23 +723,31 @@
 %7D);%0A%0A// 
+Lint Java
 Script
-s
 %0Agulp.ta
@@ -750,23 +750,22 @@
 p.task('
-scripts
+jshint
 ', funct
@@ -763,24 +763,25 @@
 t', function
+ 
 () %7B%0A  retur
@@ -797,18 +797,16 @@
 c(%5B%0A    
-  
 'app/scr
@@ -824,18 +824,16 @@
 s',%0A    
- 
- 
 'gulpfil
@@ -843,18 +843,16 @@
 s',%0A    
-  
 'Gruntfi
@@ -861,14 +861,55 @@
 .js'
+%5D)
 %0A    
-%5D
+.pipe(reload(%7Bstream: true, once: true%7D)
 )%0A  
@@ -920,26 +920,23 @@
 ipe(
-jshint('
+plugins
 .jshint
-rc'
+(
 ))%0A 
@@ -944,16 +944,24 @@
   .pipe(
+plugins.
 jshint.r
@@ -997,16 +997,24 @@
   .pipe(
+plugins.
 notify(%7B
@@ -1028,15 +1028,14 @@
 e: '
-Scripts
+jshint
  tas
@@ -1050,16 +1050,248 @@
 te!' %7D))
+%0A    .pipe(plugins.if(!browserSync.active, plugins.jshint.reporter('fail')));%0A%7D);%0A%0A// Compile LESS files%0Agulp.task('less', function () %7B%0A  gulp.src('app/styles/**/*.less')%0A    .pipe(plugins.less())%0A    .pipe(gulp.dest('app/styles'))
 ;%0A%7D);%0A%0A/
@@ -1332,24 +1332,13 @@
 , %5B'
-connect', 'watch
+serve
 '%5D, 
@@ -1369,17 +1369,26 @@
 art(
-'script
+%5B'jshint', 'les
 s'
+%5D
 );%0A%7D

Use browser-sync, parse LESS files