<commit_before>var gulp = require('gulp');
var ts = require('gulp-typescript');
var jasmine = require('gulp-jasmine');
var plumber = require('gulp-plumber');
var sourcemap = require('gulp-sourcemaps');
var replace = require('gulp-replace');
var path = require('path');
var merge = require('merge2');
var sequence = require('run-sequence');

var paths = require('../paths');

gulp.task('build', function (done) {
  sequence('build:source', 'build:spec', done);
});

gulp.task('build:source', function () {
  var tsProject = ts.createProject('tsconfig.json', {
    typescript: require('typescript')
  });

  var tsResult =
    gulp.src([paths.source + '**/*.ts', "node_modules/@types/**/index.d.ts", "!node_modules/@types/**/node_modules/**/*.d.ts"])
      .pipe(sourcemap.init())
      .pipe(tsProject());

  return merge([
    tsResult.dts.pipe(gulp.dest(paths.output)),
    tsResult.js
      //hack fix for https://github.com/ivogabe/gulp-typescript/issues/395
      .pipe(sourcemap.write('.', {
        sourceRoot: function (file) {
          var relative = path.relative(file.path, path.normalize(path.join(__dirname, "..", "..", paths.source)));
          var relativeSource = path.join(relative, paths.source)
          return relativeSource;
        }
      }))
      .pipe(gulp.dest(paths.output))
  ]);
});

gulp.task('build:spec', function () {
  var tsProject = ts.createProject('tsconfig.json', {
    typescript: require('typescript')
  });

  var tsResult =
    gulp.src([paths.spec + '**/*spec.ts', "node_modules/@types/**/index.d.ts", "!node_modules/@types/**/node_modules/**/index.d.ts"])
      .pipe(sourcemap.init())
      .pipe(tsProject());

  return tsResult.js
    //hack fix for https://github.com/ivogabe/gulp-typescript/issues/395<commit_msg>(chore): add comments to build<commit_after>var gulp = require('gulp');
var ts = require('gulp-typescript');
var jasmine = require('gulp-jasmine');
var plumber = require('gulp-plumber');
var sourcemap = require('gulp-sourcemaps');
var replace = require('gulp-replace');
var path = require('path');
var merge = require('merge2');
var sequence = require('run-sequence');

var paths = require('../paths');

gulp.task('build', function (done) {
  sequence('build:source', 'build:spec', done);
});

gulp.task('build:source', function () {
  var tsProject = ts.createProject('tsconfig.json', {
    typescript: require('typescript')
  });

  var tsResult =
    //hack fix for https://github.com/ivogabe/gulp-typescript/issues/422
    gulp.src([paths.source + '**/*.ts', "node_modules/@types/**/index.d.ts", "!node_modules/@types/**/node_modules/**/*.d.ts"])
      .pipe(sourcemap.init())
      .pipe(tsProject());

  return merge([
    tsResult.dts.pipe(gulp.dest(paths.output)),
    tsResult.js
      //hack fix for https://github.com/ivogabe/gulp-typescript/issues/395
      .pipe(sourcemap.write('.', {
        sourceRoot: function (file) {
          var relative = path.relative(file.path, path.normalize(path.join(__dirname, "..", "..", paths.source)));
          var relativeSource = path.join(relative, paths.source)
          return relativeSource;
        }
      }))
      .pipe(gulp.dest(paths.output))
  ]);
});

gulp.task('build:spec', function () {
  var tsProject = ts.createProject('tsconfig.json', {
    typescript: require('typescript')
  });

  var tsResult =
    //hack fix for https://github.com/ivogabe/gulp-typescript/issues/422
    gulp.src([paths.spec + '**/*spec.ts', "node_modules/@types/**/index.d.ts", "!node_modules/@types/**/node_modules/**/index.d.ts"])
      .pipe(sourcemap.init())
      .pipe(tsProject());

  return tsResult.js
    //hack fix for https://github.com/ivogabe/gulp-typescript/issues/395
{'fraction_non_alphanumeric': 0.19621109607577808, 'fraction_numerical': 0.005412719891745603, 'mean_word_length': 3.6373902132998746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '1834473', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1208, 'n_words': 203}