<commit_before>/**
 * @file _warhorse.js
 * @description The Warhorse command configuration file (test).
 * @author <NAME> <<EMAIL>> {@link https://github.com/kasargeant https://github.com/kasargeant}.
 * @copyright <NAME> 2017
 * @license See LICENSE file included in this distribution.
 */

// Warhorse task definitions
function tasks(warhorse) {
    "use strict";

    return {
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        // COMMANDS
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        // Commands are used to group together any arbitrary number of tasks.
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "build": function() {
            warhorse.version("git", {
                action: "get-branch-name"
            });
            warhorse.bundle("js", {
                src: "./test/data/client_src/js/index.js",
                dst: "./test/data/client_dist/js/index.js"
            });
            warhorse.minify("js", {
                src: "test/data/client_dist/js/index.js",
                dst: "test/data/client_dist/js/index.min.js"
            });
            warhorse.compress("js", {
                src: "test/data/client_dist/js/index.min.js",
                dst: "test/data/client_dist/js/index.tar.gz"
            });
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "distribute": function() {
            warhorse
                .execute("clean")
                .execute("process")
                .execute("lint")
                .execute("test")
                .execute("build")
                .execute("document");
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "clean": function() {
            warhorse
                .clean([
                    "./test/data/client_dist/img/ico/*",
                    "./test/data/client_dist/img/gif/*",
                    "./test/data/client_dist/img/jpg/*",
                    "./test/data/client_dist/img/png/*",
                    "./test/data/client_dist/img/svg/*",
                    "./test/data/client_dist/css/*",
                    "./test/data/client_dist/js/*",
                    "./test/data/client_dist/css/*"]);
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "document": function() {
            warhorse.document("js", {
                src: "./src/js/Warhorse.js",
                dst: "./docs/api",
            });
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "fix": function() {
            warhorse.fix("js", {<commit_msg>Modifies Warhorse command config file to facilitate simpler unit testing.<commit_after>/**
 * @file _warhorse.js
 * @description The Warhorse command configuration file (test).
 * @author <NAME> <<EMAIL>> {@link https://github.com/kasargeant https://github.com/kasargeant}.
 * @copyright <NAME> 2017
 * @license See LICENSE file included in this distribution.
 */

// Warhorse task definitions
function tasks(warhorse) {
    "use strict";

    return {
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        // COMMANDS
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        // Commands are used to group together any arbitrary number of tasks.
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "build": function() {
            warhorse.version("git", {
                action: "get-branch-name"
            });
            warhorse.bundle("js", {
                src: "./test/data/client_src/js/index.js",
                dst: "./test/data/client_dist/js/index.js"
            });
            warhorse.minify("js", {
                src: "test/data/client_dist/js/index.js",
                dst: "test/data/client_dist/js/index.min.js"
            });
            warhorse.compress("js", {
                src: "test/data/client_dist/js/index.min.js",
                dst: "test/data/client_dist/js/index.tar.gz"
            });
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "clean": function() {
            warhorse
                .clean([
                    "./test/data/client_dist/img/ico/*",
                    "./test/data/client_dist/img/gif/*",
                    "./test/data/client_dist/img/jpg/*",
                    "./test/data/client_dist/img/png/*",
                    "./test/data/client_dist/img/svg/*",
                    "./test/data/client_dist/css/*",
                    "./test/data/client_dist/js/*",
                    "./test/data/client_dist/css/*"]);
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "distribute": function() {
            warhorse.execute("clean");
            warhorse.execute("process");
            warhorse.execute("lint");
            warhorse.execute("test");
            warhorse.execute("build");
            warhorse.execute("document");
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "document": function() {
            warhorse.document("js", {
                src: "./src/js/Warhorse.js",
                dst: "./docs/api",
            });
        },

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "fix": function() {
            warhorse.fix("js", {
{'fraction_non_alphanumeric': 0.3000360620266859, 'fraction_numerical': 0.00144248106743599, 'mean_word_length': 1.7569582504970178, 'pattern_counts': {'":': 10, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '5341656', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1353, 'n_words': 204}