<commit_before>let fs = require('fs');
let mkdir = require('mkdirp');
let fsExtra = require('fs-extra');

module.exports = function(DT ,fileOrDirectory){
  let self=   this;
  let makeDir = function(callback){
      fsExtra.copy(`${DT.path.directorys}/${fileOrDirectory}`, DT.path.external, function(err) {
        if (err) {
          console.log(`\x1b[33m'${template}'\x1b[0m not found in templates.`);
          return
        }
        console.log(`\x1b[33m '${template}'\x1b[0m cloned to \x1b[36m ${externalPath} \x1b[0m `)
          process.exit()
      });
  }
  let buildFromTemplate = function(){

    let exit = function(counter ,limit){
      if(counter == limit){
        process.exit()
      }
    }
    let done = function(obj){

      let arrayOfPaths = self.parse(`${DT.path.external}\\${fileOrDirectory}` ,obj);
      if(arrayOfPaths.length){
        var k = 0;
        arrayOfPaths.forEach(function(_path){
          k++;
          console.log('making' ,_path)
          if(/\.[a-z]+$/i.test(_path)){
            fsExtra.outputFile(_path ,'' ,exit.bind(null,k , arrayOfPaths.length))
          }else{
            mkdir(_path)
          }

        });
      }else{<commit_msg>corected path to always end with "<commit_after>let fs = require('fs');
let mkdir = require('mkdirp');
let fsExtra = require('fs-extra');

module.exports = function(DT ,fileOrDirectory){
  let self=   this;
  let makeDir = function(callback){
      fsExtra.copy(`${DT.path.directorys}/${fileOrDirectory}`, DT.path.external, function(err) {
        if (err) {
          console.log(`\x1b[33m'${template}'\x1b[0m not found in templates.`);
          return
        }
        console.log(`\x1b[33m '${template}'\x1b[0m cloned to \x1b[36m ${externalPath} \x1b[0m `)
          process.exit()
      });
  }
  let buildFromTemplate = function(){

    let exit = function(counter ,limit){
      if(counter == limit){
        process.exit()
      }
    }
    let done = function(obj){
      let __path = `${DT.path.external}\\${fileOrDirectory}`;
      __path = /\/$/.test(__path) ? __path : __path+'\\';
      let arrayOfPaths = self.parse(obj , __path);

      if(arrayOfPaths.length){
        var k = 0;
        arrayOfPaths.forEach(function(_path){
          k++;
          console.log('making' ,_path)
          if(/\.[a-z]+$/i.test(_path)){
            fsExtra.outputFile(_path ,'' ,exit.bind(null,k , arrayOfPaths.length))
          }else{
            mkdir(_path)
          }

        });
      }else{
{'fraction_non_alphanumeric': 0.16927396710790213, 'fraction_numerical': 0.012835940633774568, 'mean_word_length': 2.334224598930481, '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': '561303', 'n_tokens_mistral': 832, 'n_tokens_neox': 815, 'n_words': 150}