<commit_before>var path = require('path');
var os = require('os');

var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require("babelify");
var through = require('through2');
var runSequence = require('run-sequence');

var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var zip = require('gulp-zip');
var shell = require('gulp-shell');

var gulpUtils = require('@anyware/gulp-utils');

var MINIMUM_CODE_COVERAGE = 90;
var BUILD_DIRECTORY = 'build';

// Create shared tasks
require('@anyware/gulp-utils/tasks/test-task')(
  gulp,
  'test', // taskName
  'app/src/**/*.js', // filesToCover
  'app/test/**/*-test.js', // testFiles
  process.env.TRAVIS ? 'spec' : 'nyan', // reporter
  MINIMUM_CODE_COVERAGE // minimumCodeCoverage
);
require('@anyware/gulp-utils/tasks/submit-coverage-task')(
  gulp,
  'submit-coverage' // taskName
);
require('@anyware/gulp-utils/tasks/lint-task')(
  gulp,
  'lint', // taskName
  ["app/**/*.js"] // files
);

gulp.task('default', function(callback) {
  return runSequence('lint', 'test', 'build', 'package', callback);
});

gulp.task('build', ['build-app', 'collect-static', 'collect-sounds', 'collect-manifest', 'collect-pages', 'collect-scripts']);

gulp.task('build-app', function buildApp() {
  var browserified = through.obj(function(file, enc, next) {
    browserify(file.path, {
      debug: true,
    }).transform(babelify.configure({
      stage: 0
    })).bundle(function(err, res){
      // assumes file.contents is a Buffer
      if (err) {
        throw err;
      }
      file.contents = res;
      next(null, file);
    });
  });<commit_msg>Disable sourcemaps for included projects due to browserify bug<commit_after>var path = require('path');
var os = require('os');

var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require("babelify");
var through = require('through2');
var runSequence = require('run-sequence');

var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var zip = require('gulp-zip');
var shell = require('gulp-shell');

var gulpUtils = require('@anyware/gulp-utils');

var MINIMUM_CODE_COVERAGE = 90;
var BUILD_DIRECTORY = 'build';

// Create shared tasks
require('@anyware/gulp-utils/tasks/test-task')(
  gulp,
  'test', // taskName
  'app/src/**/*.js', // filesToCover
  'app/test/**/*-test.js', // testFiles
  process.env.TRAVIS ? 'spec' : 'nyan', // reporter
  MINIMUM_CODE_COVERAGE // minimumCodeCoverage
);
require('@anyware/gulp-utils/tasks/submit-coverage-task')(
  gulp,
  'submit-coverage' // taskName
);
require('@anyware/gulp-utils/tasks/lint-task')(
  gulp,
  'lint', // taskName
  ["app/**/*.js"] // files
);

gulp.task('default', function(callback) {
  return runSequence('lint', 'test', 'build', 'package', callback);
});

gulp.task('build', ['build-app', 'collect-static', 'collect-sounds', 'collect-manifest', 'collect-pages', 'collect-scripts']);

gulp.task('build-app', function buildApp() {
  var browserified = through.obj(function(file, enc, next) {
    browserify(file.path, {
// FIXME: Wait for https://github.com/substack/node-browserify/issues/1446
//      debug: true,
    }).transform(babelify.configure({
      stage: 0
    })).bundle(function(err, res){
      // assumes file.contents is a Buffer
      if (err) {
        throw err;
      }
      file.contents = res;
      next(null, file);
    });
  });
{'fraction_non_alphanumeric': 0.1896059394631639, 'fraction_numerical': 0.0034266133637921186, 'mean_word_length': 4.047550432276657, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '703335', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1185, 'n_words': 244}