<commit_before>const config      = require('./gulp-config.json');
const runSequence = require('run-sequence');
const gulp        = require('gulp');
const del         = require('del');
const browserSync = require('browser-sync');
const watch       = require('gulp-watch');
const util = require('gulp-util');

var cleanFolderList = [];
var taskList = [];
var watchTaskList = [];

util.env.boilerplate = {
    config
};

for(var taskName in config.tasks) {
    if (config.tasks.hasOwnProperty(taskName)) {
        gulp.task(taskName, require('./node_modules/adfab-gulp-boilerplate/tasks/' + taskName));
        taskList.push(taskName);
        if(config.tasks[taskName].hasOwnProperty('destination')) {
            cleanFolderList.push(config.tasks[taskName].destination);
        }
        if(config.tasks[taskName].hasOwnProperty('watch')) {
            watchTaskList.push({'task': taskName, 'fileList': config.tasks[taskName].watch });
        } else if(config.tasks[taskName].hasOwnProperty('source')) {
            // 'scripts' task is bundled with babel, watch is managed in 'scripts' task
            if(taskName !== 'scripts') {
                watchTaskList.push({'task': taskName, 'fileList': config.tasks[taskName].source });
            }
        }
    }
}

/**
 * Clean build directory
 */
gulp.task('clean', function() {
    return del(cleanFolderList, { cwd: config.destinationRoot });
});

/**
 * Build app from sources
 */
gulp.task('build', ['clean'], function() {
    return runSequence(taskList);
});
<commit_msg>[feature] BOILERPLATE-62: Adds a disable clean option dz<commit_after>const config      = require('./gulp-config.json');
const runSequence = require('run-sequence');
const gulp        = require('gulp');
const del         = require('del');
const browserSync = require('browser-sync');
const watch       = require('gulp-watch');
const util = require('gulp-util');

var cleanFolderList = [];
var taskList = [];
var watchTaskList = [];

util.env.boilerplate = {
    config
};

for(var taskName in config.tasks) {
    if (config.tasks.hasOwnProperty(taskName)) {
        gulp.task(taskName, require('./node_modules/adfab-gulp-boilerplate/tasks/' + taskName));
        var task = config.tasks[taskName];
        taskList.push(taskName);
        if(task.hasOwnProperty('destination') && (!task.hasOwnProperty('clean') || task.clean)) {
            cleanFolderList.push(config.tasks[taskName].destination);
        }
        if(task.hasOwnProperty('watch')) {
            watchTaskList.push({'task': taskName, 'fileList': task.watch });
        } else if(task.hasOwnProperty('source')) {
            // 'scripts' task is bundled with babel, watch is managed in 'scripts' task
            if(taskName !== 'scripts') {
                watchTaskList.push({'task': taskName, 'fileList': task.source });
            }
        }
    }
}

/**
 * Clean build directory
 */
gulp.task('clean', function() {
    return del(cleanFolderList, { cwd: config.destinationRoot });
});

/**
 * Build app from sources
 */
gulp.task('build', ['clean'], function() {
    return runSequence(taskList);
});

{'fraction_non_alphanumeric': 0.16264090177133655, 'fraction_numerical': 0.0006441223832528181, 'mean_word_length': 3.1579651941097726, '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': '4590528', 'n_tokens_mistral': 910, 'n_tokens_neox': 908, 'n_words': 180}