<commit_before>#!/usr/bin/env node

var fs = require('fs');
var path = require('path');

var localFile   = path.normalize(__dirname + '/../config/ah-taskmanager-plugin.js');
var projectFile = path.normalize(process.cwd() + '/../../config/plugins/ah-taskmanager-plugin.js');

function copyFile(source, target) {
    'use strict';
    var rd = fs.createReadStream(source);
    rd.on("error", function(err) {
        console.error(err);
    });
    var wr = fs.createWriteStream(target);
    wr.on("error", function(err) {
        console.error(err);
    });
    wr.on("close", function(ex) {
        console.log("Done copying file.")
    });
    rd.pipe(wr);
}

if(!fs.existsSync(projectFile)){
    console.log("Copying configuration files for TaskManager Plugin");
    console.log("copying " + localFile + " to " + projectFile);
    copyFile(localFile, projectFile);

}
<commit_msg>adding notification of existing config file to postinstall script<commit_after>#!/usr/bin/env node

var fs = require('fs');
var path = require('path');

var localFile   = path.normalize(__dirname + '/../config/ah-taskmanager-plugin.js');
var projectFile = path.normalize(process.cwd() + '/../../config/plugins/ah-taskmanager-plugin.js');

function copyFile(source, target) {
    'use strict';
    var rd = fs.createReadStream(source);
    rd.on("error", function(err) {
        console.error(err);
    });
    var wr = fs.createWriteStream(target);
    wr.on("error", function(err) {
        console.error(err);
    });
    wr.on("close", function(ex) {
        console.log("Done copying file.")
    });
    rd.pipe(wr);
}

if(!fs.existsSync(projectFile)){
    console.log("Copying configuration files for TaskManager Plugin");
    console.log("copying " + localFile + " to " + projectFile);
    copyFile(localFile, projectFile);
} else {
    console.log("Config file already exists!");
}

{'fraction_non_alphanumeric': 0.17272727272727273, 'fraction_numerical': 0.0, 'mean_word_length': 3.5193236714975846, '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': '1035549', 'n_tokens_mistral': 596, 'n_tokens_neox': 583, 'n_words': 117}