How to avoid GULP opening a new tab?

That's my question, every time I go to the console and try to restart the server by doing gulp, a new tab is open in the browser, so I have to close the one I have open and start working on the new one.

And another question regarding the same:

sometimes there is an error on the code styling and the tab is open anyways once you do gulp, but you can not start working on it until you fix the error on the code style, then you go and do gulp and the new tab comes up.

here is my gulpfile.js

var gulp = require('gulp');

var paths = {
  sass: ['scss/**/*.scss'],
  js: ['www/js/*.js', 'www/js/**/*.js', '!www/js/lib.min.js', '!www/js/code.min.js']
};

// Dev task
gulp.task('dev', ['sass', 'lint', 'compress-lib', 'compress-js', 'run-ionic'], function() { });

// Build task
gulp.task('default', ['dev', 'lint', 'sass', 'compress-lib', 'compress-js', 'watch']);

//Ionic Serve Task
gulp.task('run-ionic',shell.task([
  'ionic serve'
]));

gulp.task('compress-lib', function() {
  gulp.src([
    './www/lib/ionic/js/ionic.bundle.min.js'
  ])
    .pipe(concat('lib.min.js'))
    .pipe(gulp.dest('./www/js'))
    .pipe(livereload());
});

gulp.task('compress-js', function() {
  gulp.src([
    './www/js/app.js'
  ])
    .pipe(ngAnnotate())
    .pipe(concat('code.min.js'))
    .pipe(gulp.dest('./www/js'))
    .pipe(livereload());
});

// JSHint task
gulp.task('lint', function() {
  gulp.src(paths.js)
      .pipe(jscs())
      .pipe(jshint())
      .pipe(jshint.reporter('default'))
      .pipe(livereload());
});

gulp.task('sass', function(done) {
  gulp.src('./scss/ionic.app.scss')
    .pipe(sass({onError: function(e) { console.log(e); } }))
    .pipe(autoprefixer('last 2 versions', 'Chrome', 'ios_saf','Android'))
    .pipe(gulp.dest('./www/css/'))
    .pipe(minifyCss({
      keepSpecialComments: 0
    }))
    .pipe(rename({ extname: '.min.css' }))
    .pipe(gulp.dest('./www/css/'))
    .on('end', done)
    .pipe(livereload());
});

gulp.task('watch', function() {
  gulp.watch(paths.sass, ['sass']);
  gulp.watch(paths.js, ['lint', 'compress-lib', 'compress-js']);
  livereload.listen(9000);
});

gulp.task('install', ['git-check'], function() {
  return bower.commands.install()
    .on('log', function(data) {
      gutil.log('bower', gutil.colors.cyan(data.id), data.message);
    });
});

Live Reload App During Development (beta)

The run or emulate command will deploy the app to the specified platform devices/emulators. You can also run live reload on the specified platform device by adding the --livereload option. The live reload functionality is similar to ionic serve, but instead of developing and debugging an app using a standard browser, the compiled hybrid app itself is watching for any changes to its files and reloading the app when needed. This reduces the requirement to constantly rebuild the app for small changes. However, any changes to plugins will still require a full rebuild. For live reload to work, the dev machine and device must be on the same local network, and the device must support web sockets.

With live reload enabled, an app's console logs can also be printed to the terminal/command prompt by including the --consolelogs or -c option. Additionally, the development server's request logs can be printed out using --serverlogs or -s options.

Command-line flags/options for run and emulate:

[--livereload|-l] .......  Live Reload app dev files from the device (beta)
[--consolelogs|-c] ......  Print app console logs to Ionic CLI (live reload req.)
[--serverlogs|-s] .......  Print dev server logs to Ionic CLI (live reload req.)
[--port|-p] .............  Dev server HTTP port (8100 default, live reload req.)
[--livereload-port|-i] ..  Live Reload port (35729 default, live reload req.)
[--debug|--release]

While the server is running for live reload, you can use the following commands within the CLI:

restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit