<commit_before>var version = process.argv[2];
if( version === undefined ) {
	console.error( "expecting command line argument of a semver");
	return -1;
}

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

var inputs = [
	"three.js",
	"three.extra.js"
	];

var inputDirectory = "./build";
var outputDirectory = "../Clara.io/hub/three";

var packageTemplate = {
  "name": "three",
  "description": "threehub three.js",
  "version": version,
  "private": true,
  "license": "UNLICENSED",
  "main": "./three.extra.js",
  "jsnext:main": "./three.extra.js",
  "dependencies": {
  },
  "devDependencies": {
  }
};

console.log( "Deploying: " + version );

for( var i = 0; i < inputs.length; i ++ ) {
	var v = function() {
		var input = inputs[i];
		fs.readFile( inputDirectory + "/" + input, 'utf8', function( err, data ) {
			if( err ) return console.log( "Error: ", err );
			fs.writeFile( outputDirectory + "/" + input, data, "utf8", function( err ) {
				if( err ) return console.log( "Error: ", err );		
				console.log( "Success: " + input );
			})
		} );
	}();
}

fs.writeFile( outputDirectory + "/package.json", JSON.stringify( packageTemplate ), "utf8", function( err ) {
	if( err ) return console.log( "Error: ", err );		
	console.log( "Success: " + "package.json" );
});<commit_msg>improved formatting of generated output<commit_after>var version = process.argv[2];
if( version === undefined ) {
	console.error( "expecting command line argument of a semver");
	return -1;
}

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

var inputs = [
	"three.js",
	"three.extra.js"
	];

var inputDirectory = "./build";
var outputDirectory = "../Clara.io/hub/three";

var packageTemplate = {
  "name": "three",
  "description": "threehub three.js",
  "version": version,
  "private": true,
  "license": "UNLICENSED",
  "main": "./three.extra.js",
  "jsnext:main": "./three.extra.js",
  "dependencies": {
  },
  "devDependencies": {
  }
};

console.log( "Deploying: " + version );

for( var i = 0; i < inputs.length; i ++ ) {
	var v = function() {
		var input = inputs[i];
		fs.readFile( inputDirectory + "/" + input, 'utf8', function( err, data ) {
			if( err ) return console.log( "Error: ", err );
			fs.writeFile( outputDirectory + "/" + input, data, "utf8", function( err ) {
				if( err ) return console.log( "Error: ", err );
				console.log( "Success: " + input );
			})
		} );
	}();
}

fs.writeFile( outputDirectory + "/package.json", JSON.stringify( packageTemplate, null, '  ' ) + '\n', "utf8", function( err ) {
	if( err ) return console.log( "Error: ", err );
	console.log( "Success: " + "package.json" );
});

{'fraction_non_alphanumeric': 0.20305343511450383, 'fraction_numerical': 0.004580152671755725, 'mean_word_length': 3.5901926444833627, 'pattern_counts': {'":': 18, '<': 5, '<?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': '3537443', 'n_tokens_mistral': 949, 'n_tokens_neox': 912, 'n_words': 232}