const gulp = require('gulp')
const browserSync = require('browser-sync').create()

const concat = require('gulp-concat')
const uglify = require('gulp-uglify')

const sass = require('gulp-sass')
const sourcemaps = require('gulp-sourcemaps')
const autoprefixer = require('gulp-autoprefixer')

gulp.task('sass', function () {
  return gulp.src('./app/src/sass/**/*.scss')
    .pipe(sourcemaps.init())
    .pipe(sass({ outputStyle: 'expanded'} ).on('error', sass.logError))
    .pipe(sourcemaps.write())
    .pipe( autoprefixer({ browsers: ['last 2 versions'] }) )
    .pipe(gulp.dest('./app/assets/css/'))
    .pipe(browserSync.stream())
})

gulp.task('js', function () {
  return gulp.src('./app/src/js/**/*.js')
    .pipe(sourcemaps.init())
    .pipe(concat('all.min.js'))
    .pipe(uglify())
    .pipe(sourcemaps.write(''))
    .pipe(gulp.dest('./app/assets/js/'))
    .pipe(browserSync.stream())
})

gulp.task('serve', ['sass', 'js'], function () {
  browserSync.init({
    server: "./app",
    injectChanges: true,
    notify: false
  })

  gulp.watch('app/src/sass/**/*.scss', ['sass'])
  gulp.watch('app/src/js/**/*.js', ['js'])
  gulp.watch('app/**/*.html').on('change', browserSync.reload)
})

gulp.task('default', ['serve'])

@@ -284,16 +284,190 @@
 ixer')%0A%0A
+const PATHS = %7B%0A  styles: %7B%0A    src: 'app/src/sass/**/*.scss',%0A    dest: 'app/assets/css/'%0A  %7D,%0A  scripts: %7B%0A    src: 'app/src/js/**/*.js',%0A    dest: 'app/assets/js/'%0A  %7D%0A%7D%0A%0A
 gulp.tas
@@ -512,34 +512,24 @@
 src(
-'./app/src/sass/**/*.scss'
+PATHS.styles.src
 )%0A  
@@ -742,27 +742,25 @@
 est(
-'./app/assets/css/'
+PATHS.styles.dest
 ))%0A 
@@ -846,30 +846,25 @@
 src(
-'./app/src/js/**/*.js'
+PATHS.scripts.src
 )%0A  
@@ -998,26 +998,26 @@
 est(
-'./app/assets/js/'
+PATHS.scripts.dest
 ))%0A 
@@ -1100,16 +1100,49 @@
 on () %7B%0A
+  console.log(PATHS.styles.src);%0A
   browse
@@ -1170,15 +1170,15 @@
 er: 
-%22
+'
 ./app
-%22
+'
 ,%0A  
@@ -1241,32 +1241,24 @@
 tch(
-'app/src/sass/**/*.scss'
+PATHS.styles.src
 , %5B'
@@ -1278,36 +1278,33 @@
 p.watch(
-'app/src/js/**/*.js'
+PATHS.scripts.src
 , %5B'js'%5D

put paths in variables to avoid repetition