<commit_before>import { Task } from '../task';

import fs from 'fs';
import del from 'del';

class CleanTask {
    constructor(opts = {}) {
        this.name = 'clean';

        Task.checkRequiredParams(this.name, opts, ['paths']);

        if ( !Array.isArray(opts.paths) ) {
            opts.paths = [ opts.paths ];
        }

        return Task.addGulpTask(this.name, (cb) => {
            if ( fs.existsSync(opts.paths) ) {
                return del(opts.paths, cb);
            }

            cb();
        });
    }
}

function cleanFactory(opts = {}) {
    return new CleanTask(opts);
}

export { cleanFactory as clean };<commit_msg>remove fs check for dir in clean task<commit_after>import { Task } from '../task';

import fs from 'fs';
import del from 'del';

class CleanTask {
    constructor(opts = {}) {
        this.name = 'clean';

        Task.checkRequiredParams(this.name, opts, ['paths']);

        if ( !Array.isArray(opts.paths) ) {
            opts.paths = [ opts.paths ];
        }

        return Task.addGulpTask(this.name, (cb) => {
            return del(opts.paths, cb);
        });
    }
}

function cleanFactory(opts = {}) {
    return new CleanTask(opts);
}

export { cleanFactory as clean };
{'fraction_non_alphanumeric': 0.1511437908496732, 'fraction_numerical': 0.0, 'mean_word_length': 2.125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1503654', 'n_tokens_mistral': 374, 'n_tokens_neox': 371, 'n_words': 88}