'use strict';
var gulp = require('gulp'),
    jshint = require('gulp-jshint'),
    concat = require('gulp-concat'),
    closureCompiler = require('gulp-closure-compiler'),
    wrapper = require('gulp-wrapper'),
    karma = require('karma').server,
    config = require('./package.json');

gulp.task('lint', function () {
  return gulp.src('./src/*.js')
    .pipe(jshint())
    .pipe(jshint.reporter('default'));
});

gulp.task('test', ['lint'], function (done) {
  karma.start({
    configFile: __dirname + '/karma.conf.js',
    singleRun: true
  }, function () {
    done();
  });
});

gulp.task('dist', function () {
  return gulp.src('./src/*.js')
    .pipe(concat(config.name + '.js'))
    .pipe(wrapper({
      header: '"use strict";\n(function () {\n',
      footer: '}).call(window);'
    }))
    .pipe(gulp.dest('dist'))
    .pipe(closureCompiler({
      compilerPath: 'node_modules/closure-compiler/lib/vendor/compiler.jar',
      fileName: config.name + '.min.js',
      compilerFlags: {
        language_in: 'ECMASCRIPT5_STRICT'
      }
    }))
    .pipe(gulp.dest('dist'));
});

@@ -1003,40 +1003,267 @@
     
-language_in: 'ECMASCRIPT5_STRICT
+/*jshint camelcase: false */%0A        language_in: 'ECMASCRIPT5_STRICT',%0A        create_source_map: './dist/' + config.name + '.min.js.map',%0A        source_map_format: 'V3',%0A        output_wrapper: '//# sourceMappingURL=' + config.name + '.min.js.map%5Cn%25output%25
 '%0A  

Configure sourceMappingUrl