<commit_before>let archiver = require('archiver');
let fs = require('fs');
let version = '1.0.2';

if (process.env.TRAVIS_BUILD_NUMBER) {
    version = `${version}.${process.env.TRAVIS_BUILD_NUMBER}`;
}

let path = `${__dirname}/dist/JAlgoArena-UI-${version}.zip`;
console.log(`Creating package at: ${path}`);
let output = fs.createWriteStream(path);
let archive = new archiver('zip', { store: true });

output.on('close', function() {
    console.log(`${archive.pointer()} total bytes`);
    console.log('archiver has been finalized and the output file descriptor has closed.');
});

archive.on('error', function(err) {
    throw err;
});

archive.pipe(output);

archive.directory('./public', { name: 'public'});
archive.directory('./node_modules', { name: 'node_modules'});
archive.directory('./server', { name: 'server'});
archive.directory('./client', { name: 'client'});<commit_msg>Make it run on Node 4<commit_after>var archiver = require('archiver');
var fs = require('fs');
var version = '1.0.2';

if (process.env.TRAVIS_BUILD_NUMBER) {
    version = `${version}.${process.env.TRAVIS_BUILD_NUMBER}`;
}

var path = `${__dirname}/dist/JAlgoArena-UI-${version}.zip`;
console.log(`Creating package at: ${path}`);
var output = fs.createWriteStream(path);
var archive = new archiver('zip', { store: true });

output.on('close', function() {
    console.log(`${archive.pointer()} total bytes`);
    console.log('archiver has been finalized and the output file descriptor has closed.');
});

archive.on('error', function(err) {
    throw err;
});

archive.pipe(output);

archive.directory('./public', { name: 'public'});
archive.directory('./node_modules', { name: 'node_modules'});
archive.directory('./server', { name: 'server'});
archive.directory('./client', { name: 'client'});
{'fraction_non_alphanumeric': 0.20426487093153758, 'fraction_numerical': 0.003928170594837262, 'mean_word_length': 5.4601449275362315, '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': '4856649', 'n_tokens_mistral': 563, 'n_tokens_neox': 573, 'n_words': 128}