<commit_before>

var util = require('./util');
var argv = require('minimist')(process.argv.slice(2));
var cpy = require("cpy");


if(argv._ && argv._.length > 0) //look release build
{
    var subCommand = argv._[0];
    if(subCommand.toLowerCase() === "release")
    {
        build(true);
    }

}
else //do dev build
{
    build();
}

function build(isRelease){

    var cmd = "tsc";

    if(!isRelease)
        cmd= cmd + " --sourceMap";


    util.series(["npm run clean",cmd], function (err) {

        if(err)
        {
            console.log(err);
            process.exit(1);
        }
        else
        {

            cpy(["**/*.js"],"../dist",{cwd:process.cwd()+"/src",parents: true, nodir: true}).then(function(){

                process.exit(0);

            },function(err){

                console.log(err);
                process.exit(1);
            })
        }
    });

}

<commit_msg>fixing issue, should dist only during release<commit_after>

var util = require('./util');
var argv = require('minimist')(process.argv.slice(2));
var cpy = require("cpy");


if(argv._ && argv._.length > 0) //look release build
{
    var subCommand = argv._[0];
    if(subCommand.toLowerCase() === "release")
    {
        build(true);
    }

}
else //do dev build
{
    build();
}

function build(isRelease){

    var cmd = "tsc";

    if(!isRelease)
        cmd= cmd + " --sourceMap";


    util.series(["npm run clean",cmd], function (err) {

        if(err)
        {
            console.log(err);
            process.exit(1);
        }
        else
        {

            if(isRelease)
            {
                cpy(["**/*.js"],"../dist",{cwd:process.cwd()+"/src",parents: true, nodir: true}).then(function(){

                    process.exit(0);

                },function(err){

                    console.log(err);
                    process.exit(1);
                })
            }
        }
    });

}


{'fraction_non_alphanumeric': 0.17857142857142858, 'fraction_numerical': 0.006211180124223602, 'mean_word_length': 1.6479452054794521, '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': '6839672', 'n_tokens_mistral': 637, 'n_tokens_neox': 604, 'n_words': 113}