<commit_before>"use strict";

const fs = require("fs");
const path = require("path");
let pkg = require("../package.json");

delete pkg.scripts;
delete pkg.devDependencies;

const filepath = path.join(__dirname, "../build/package.json");
fs.writeFileSync(filepath, JSON.stringify(pkg, null, 2));<commit_msg>Checked that build directory exists in transformPackage script<commit_after>"use strict";

const fs = require("fs");
const path = require("path");
let pkg = require("../package.json");

delete pkg.scripts;
delete pkg.devDependencies;

const outputPath = path.join(__dirname, "../build");

if(!fs.existsSync(outputPath)) {
    console.info("Build folder doesn't exist. Creating...")
    fs.mkdirSync(outputPath);
}

const filepath = path.join(outputPath, "package.json");
fs.writeFileSync(filepath, JSON.stringify(pkg, null, 2));
{'fraction_non_alphanumeric': 0.1664670658682635, 'fraction_numerical': 0.0023952095808383233, 'mean_word_length': 5.688, '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': '2863358', 'n_tokens_mistral': 260, 'n_tokens_neox': 246, 'n_words': 63}