<commit_before>/* gulpfile.js - https://github.com/wearefractal/gulp */

var gulp = require('gulp');
var gutil = require('gulp-util');
var coffee = require('gulp-coffee');

var path = require('path');
var fs = require('fs');

var srcCoffeeDir = './coffee/';
var destDir = './src/';

// Emulate coffee -b -w -c -o ./src/ ./coffee
var gulpCoffee = function(coffeeFile) {

    // Mirror srcCoffeeDir dir structure to destDir
    //
    // From: srcCoffeeDir/[intermediate_dirs]/coffeeFile
    // To: destDir/[intermediate_dirs]/coffeeFile

    // __dirname/srcCoffeeDir/
    var normSrc = path.normalize(__dirname + '/' + srcCoffeeDir + '/');

    // __dirname/srcCoffeeDir/[intermediate_dirs]/coffeeFile
    var intermediate_dirs = path.relative(normSrc, path.dirname(coffeeFile));

    var normDestPath = path.normalize(destDir + '/' + intermediate_dirs + '/');
    var finalDestFilePath;

    gulp.src(coffeeFile)
        .pipe(coffee({bare: true}))
            .on('error', gutil.log)
            // Trigger system bell
            .on('error', gutil.beep)

        // Note: gulp.dest uses mkdirp.
        .pipe(gulp.dest(normDestPath))
            .on('data', function(file) {
                finalDestFilePath = path.normalize(normDestPath + '/' + path.basename(file.path));
            })
            .on('end', function() {

                var from = path.relative(__dirname, coffeeFile);
                var to = path.relative(__dirname, finalDestFilePath);

                gutil.log("Compiled '" + from + "' to '" + to + "'");

            });<commit_msg>gulp crashes when you rename file(s) during watch task<commit_after>/* gulpfile.js - https://github.com/wearefractal/gulp */

var gulp = require('gulp');
var gutil = require('gulp-util');
var coffee = require('gulp-coffee');

var path = require('path');
var fs = require('fs');

var srcCoffeeDir = './coffee/';
var destDir = './src/';

// Emulate coffee -b -w -c -o ./src/ ./coffee
var gulpCoffee = function(coffeeFile) {

    // Mirror srcCoffeeDir dir structure to destDir
    //
    // From: srcCoffeeDir/[intermediate_dirs]/coffeeFile
    // To: destDir/[intermediate_dirs]/coffeeFile

    // __dirname/srcCoffeeDir/
    var normSrc = path.normalize(__dirname + '/' + srcCoffeeDir + '/');

    // __dirname/srcCoffeeDir/[intermediate_dirs]/coffeeFile
    var intermediate_dirs = path.relative(normSrc, path.dirname(coffeeFile));

    var normDestPath = path.normalize(destDir + '/' + intermediate_dirs + '/');
    var finalDestFilePath;

    gulp.src(coffeeFile)
        .pipe(coffee({bare: true}))
            .on('error', gutil.log)
            // Trigger system bell
            .on('error', gutil.beep)

        // Note: gulp.dest uses mkdirp.
        .pipe(gulp.dest(normDestPath))
            .on('data', function(file) {
                finalDestFilePath = path.normalize(normDestPath + '/' + path.basename(file.path));
            })
            .on('end', function() {

                var from = path.relative(__dirname, coffeeFile);
                var to = finalDestFilePath && path.relative(__dirname, finalDestFilePath);

                gutil.log("Compiled '" + from + "' to '" + to + "'");

            });
{'fraction_non_alphanumeric': 0.1554858934169279, 'fraction_numerical': 0.0, 'mean_word_length': 2.4722524483133843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6287893', 'n_tokens_mistral': 1063, 'n_tokens_neox': 990, 'n_words': 199}