<commit_before>/**
 * created by mekhonoshyn on 11/3/14.
 */

var gulp = require('gulp'),
    path = require('path'),
    distDir = path.join(__dirname, '..', '..', 'external', 'useful-utils'),
    srcMask = path.join(__dirname, 'lib', '**', '*.js'),
    del = require('del'),
    runSeq = require('run-sequence'),
    fs = require('fs');

console.log('__dirname:', __dirname, fs.existsSync(__dirname));
console.log('distDir:', distDir, fs.existsSync(distDir));
console.log('srcMask:', srcMask, fs.existsSync(path.join(__dirname, 'lib')));

gulp.task('clean', function (cb) {
    return del(distDir, {
        force: true
    }, cb);
});

gulp.task('copy', function () {
    return gulp.src(srcMask).pipe(gulp.dest(distDir));
});

gulp.task('default', function (cb) {
    runSeq('clean', 'copy', cb);
});<commit_msg>post-install fix<commit_after>/**
 * created by mekhonoshyn on 11/3/14.
 */

var gulp = require('gulp'),
    path = require('path'),
    distDir = path.join(__dirname, '..', '..', 'external', 'useful-utils'),
    srcMask = path.join(__dirname, 'lib', '**', '*.js'),
    del = require('del'),
    runSeq = require('run-sequence'),
    fs = require('fs');

if (!fs.existsSync(distDir)) {
    fs.mkdirSync(distDir);
}

console.log('__dirname:', __dirname, fs.existsSync(__dirname));
console.log('distDir:', distDir, fs.existsSync(distDir));
console.log('srcMask:', srcMask, fs.existsSync(path.join(__dirname, 'lib')));

gulp.task('clean', function (cb) {
    return del(distDir, {
        force: true
    }, cb);
});

gulp.task('copy', function () {
    return gulp.src(srcMask).pipe(gulp.dest(distDir));
});

gulp.task('default', function (cb) {
    runSeq('clean', 'copy', cb);
});
{'fraction_non_alphanumeric': 0.2258254716981132, 'fraction_numerical': 0.00589622641509434, 'mean_word_length': 4.2215384615384615, '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': '3255094', 'n_tokens_mistral': 606, 'n_tokens_neox': 598, 'n_words': 110}