<commit_before>var ncp = require('ncp').ncp;
var async = require('async');
var fs = require('fs');

var libDirectories = [
  'node_modules/bootstrap',
  'node_modules/fitvids',
  'node_modules/highlightjs',
  'node_modules/jquery',
  'node_modules/masonry-layout'
]
var dest = 'public/lib';
fs.mkdirSync(dest);

async.each(libDirectories, function(directory, callback) {
  ncp(directory, dest + "/" + directory.split("/")[1], function (err) {
   if (err) {
     return console.error(err);
   }
  });
});
<commit_msg>catch exception if directory already created<commit_after>var ncp = require('ncp').ncp;
var async = require('async');
var fs = require('fs');

var libDirectories = [
  'node_modules/bootstrap',
  'node_modules/fitvids',
  'node_modules/highlightjs',
  'node_modules/jquery',
  'node_modules/masonry-layout'
]
var dest = 'public/lib';

try {
  fs.mkdirSync(dest);
} catch(e){
  //directory already created
}

async.each(libDirectories, function(directory, callback) {
  ncp(directory, dest + "/" + directory.split("/")[1], function (err) {
   if (err) {
     return console.error(err);
   }
  });
});

{'fraction_non_alphanumeric': 0.17562724014336917, 'fraction_numerical': 0.0017921146953405018, 'mean_word_length': 4.613065326633166, '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': '5467669', 'n_tokens_mistral': 393, 'n_tokens_neox': 388, 'n_words': 74}