frankhock
1/5/2015 - 4:12 PM

gistfile1.coffee

### Breaking Code ###

buildScripts = (buildPath="generated", minify=false) ->
  scripts = concatenateAllScripts()

  if minify
    scripts = scripts
      .pipe(uglify())

  scripts
    .pipe(gulp.dest("#{buildPath}/js/"))
    
### Working Code ###

buildScripts = (buildPath="generated", minify=false) ->
  scripts = concatenateAllScripts()

  if minify
    scripts = scripts
      .pipe(uglify(mangle: false))

  scripts
    .pipe(gulp.dest("#{buildPath}/js/"))