<commit_before>'use strict'

const iif = require('gulp-if')
const filter = require('gulp-filter')
const ts = require('gulp-typescript')
const sourcemaps = require('gulp-sourcemaps')
const util = require('gulp-util')

exports.dep = ['clean:js']
exports.fn = function (gulp, paths, mode, done) {
  var tsProject = ts.createProject('tsconfig.json')
  var tsResult = tsProject.src()
    .pipe(iif(mode.production, filter(['**/*', '!test/**'])))
    .pipe(iif(!mode.production, sourcemaps.init()))
    .pipe(ts(tsProject))

  return tsResult.js
    .pipe(iif(!mode.production, sourcemaps.write('.', {
      mapSources: function (sourcePath) {
        var truncatedSourcePath = sourcePath.substr(sourcePath.lastIndexOf('/') + 1)<commit_msg>Adjust method call to gulp-typescript 3 api.<commit_after>'use strict'

const iif = require('gulp-if')
const filter = require('gulp-filter')
const ts = require('gulp-typescript')
const sourcemaps = require('gulp-sourcemaps')
const util = require('gulp-util')

exports.dep = ['clean:js']
exports.fn = function (gulp, paths, mode, done) {
  var tsProject = ts.createProject('tsconfig.json')
  var tsResult = tsProject.src()
    .pipe(iif(mode.production, filter(['**/*', '!test/**'])))
    .pipe(iif(!mode.production, sourcemaps.init()))
    .pipe(tsProject())

  return tsResult.js
    .pipe(iif(!mode.production, sourcemaps.write('.', {
      mapSources: function (sourcePath) {
        var truncatedSourcePath = sourcePath.substr(sourcePath.lastIndexOf('/') + 1)
{'fraction_non_alphanumeric': 0.17501670006680026, 'fraction_numerical': 0.002004008016032064, 'mean_word_length': 4.739463601532567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1753888', 'n_tokens_mistral': 488, 'n_tokens_neox': 479, 'n_words': 101}