text: var gulp = require('gulp'),
      plumber = require('gulp-plumber'),
      rename = require('gulp-rename');
  var autoprefixer = require('gulp-autoprefixer');
  var concat = require('gulp-concat');
  var uglify = require('gulp-uglify');
  var sass = require('gulp-sass');
  var browserSync = require('browser-sync');
  
  gulp.task('browser-sync', function() {
    browserSync({
      server: {
         baseDir: "./"
      }
    });
  });
  
  gulp.task('bs-reload', function () {
    browserSync.reload();
  });
  
  
  gulp.task('styles', function(){
    gulp.src(['assets/scss/**/*.scss'])
      .pipe(plumber({
        errorHandler: function (error) {
          console.log(error.message);
          this.emit('end');
      }}))
      .pipe(sass())
      .pipe(autoprefixer('last 2 versions'))
      .pipe(gulp.dest('dist/css/'))
      .pipe(browserSync.reload({stream:true}))
  });
  
  gulp.task('scripts', function(){
    return gulp.src('assets/js/**/*.js')
      .pipe(plumber({
        errorHandler: function (error) {
          console.log(error.message);
          this.emit('end');
      }}))
      .pipe(concat('main.js'))
      .pipe(gulp.dest('dist/js/'))
      .pipe(rename({suffix: '.min'}))
      .pipe(uglify())
      .pipe(gulp.dest('dist/js/'))
      .pipe(browserSync.reload({stream:true}))
  });
  
  gulp.task('default', ['browser-sync'], function(){
    gulp.watch("assets/scss/**/*.scss", ['styles']);
    gulp.watch("assets/js/**/*.js", ['scripts']);
    gulp.watch("*.html", ['bs-reload']);
  });