import gulp from 'gulp';
import browserSync from 'browser-sync';
import {stream} from 'wiredep';
import config from '../config';

const reload = browserSync.reload;

gulp.task('bower', () => {
  const pip = gulp.src(`${config.appDir}/*.html`)
    .pipe(stream())
    .pipe(gulp.dest(config.appDir));

  if (config.env === 'development') {
    pip.pipe(reload({stream: true}));
  }

  return pip;
});
