<commit_before>var gulp = require('gulp'),
    clean = require('gulp-clean'),
    argv = require('yargs').argv,
    replace = require('gulp-replace'),
    exec = require('child_process').exec;

gulp.task('release', ['copy']);

gulp.task('copy', ['clean'], function () {
    return gulp.src('./client/build/**/*.*')
        .pipe(gulp.dest('./build/public'));
});

gulp.task('clean', argv.host ? ['compilerClient'] : [], function () {
    return gulp.src('./build/public/*.*', {
            read: false
        })
        .pipe(clean());
});

gulp.task('compilerClient', ['config'], function (cb) {
    process.chdir('./client');
    exec('yarn build', function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        process.chdir('../');
        cb(err);
    });
});

gulp.task('config', ['compilerServer'], function () {
    console.log(`${argv.host}`);
    gulp.src('./client/src/utils/urls.ts')
        .pipe(replace('localhost', argv.host || 'localhost'))
        .pipe(replace('3000', argv.port || 8080))
        .pipe(gulp.dest('./client/src/utils/'));
    gulp.src('./appconfig.json')
        .pipe(replace('localhost:3000', `${argv.host || 'localhost'}:${argv.port || 8080}`))
        .pipe(gulp.dest('./'));
});

gulp.task('compilerServer', ['npmInstallClient'], function (cb) {
    exec('tsc -p . -w false', function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        cb();
    });
});

gulp.task('npmInstallClient', [], function (cb) {
    exec('cd client & npm install', function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        cb();
    });
});<commit_msg>update gulp file<commit_after>var gulp = require('gulp'),
    clean = require('gulp-clean'),
    argv = require('yargs').argv,
    replace = require('gulp-replace'),
    exec = require('child_process').exec;

gulp.task('release', ['copy']);

gulp.task('copy', ['clean'], function () {
    return gulp.src('./client/build/**/*.*')
        .pipe(gulp.dest('./build/public'));
});

gulp.task('clean', argv.host ? ['compilerClient'] : [], function () {
    return gulp.src('./build/public/*.*', {
            read: false
        })
        .pipe(clean());
});

gulp.task('compilerClient', ['config'], function (cb) {
    process.chdir('./client');
    exec('yarn build', function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        process.chdir('../');
        cb(err);
    });
});

gulp.task('config', ['compilerServer'], function () {
    console.log(`${argv.host}`);
    gulp.src('./client/src/utils/urls.ts')
        .pipe(replace('localhost', argv.host || 'localhost'))
        .pipe(replace('3000', argv.port || 8080))
        .pipe(gulp.dest('./client/src/utils/'));
    gulp.src('./appconfig.json')
        .pipe(replace('localhost:3000', `${argv.host || 'localhost'}:${argv.port || 8080}`))
        .pipe(gulp.dest('./'));
});

gulp.task('compilerServer', ['npmClientInstall'], function (cb) {
    exec('tsc -p . -w false', function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        cb();
    });
});

gulp.task('npmClientInstall', [], function (cb) {
    exec(`cd client & npm install`, function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        cb();
    });
});
{'fraction_non_alphanumeric': 0.23124814705010377, 'fraction_numerical': 0.009487103468722205, 'mean_word_length': 2.891580161476355, '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': '1939519', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1083, 'n_words': 182}