<commit_before>module.exports = function( hook ) {
	var fs = require( "fs" )
		, appPkg = "../../package.json"
		, pkg = JSON.parse( fs.readFileSync( appPkg ).toString() )
		, installScripts = []
		, helperScript
		;

	// -----------------------------------------------------
	// Add a install hook for svn scripts if it isn't already there in the main
	// app's package.js
	// -----------------------------------------------------
	pkg.scripts = pkg.scripts || {};
	pkg.scripts.install = pkg.scripts.install || "";

	pkg.scripts.install.split( "&&" ).forEach( function( scrp ) {
		// -----------------------------------------------------
		// Clear out any older install scripts for svn-npm-crutch
		// -----------------------------------------------------
		if( -1 === scrp.indexOf( "node_modules/svn-npm-crutch" ) ) {
			scrp = scrp.trim();
			if( scrp.length > 0 ) {
				installScripts.push( scrp );
			}
		}
	});

	if( "install" === hook ) {
		helperScript = "node ./node_modules/svn-npm-crutch/lib/svn-npm-crutch.js";
		installScripts.push( helperScript );
	}

	pkg.scripts.install = installScripts.join( " && " );
	fs.writeFileSync( appPkg, JSON.stringify( pkg, null, "\t" ) );
};

<commit_msg>always paths to line up<commit_after>module.exports = function( hook ) {
	var fs = require( "fs" )
		, appPkg = __dirname + "/../../../package.json"
		, pkg = JSON.parse( fs.readFileSync( appPkg ).toString() )
		, installScripts = []
		, helperScript
		;

	// -----------------------------------------------------
	// Add a install hook for svn scripts if it isn't already there in the main
	// app's package.js
	// -----------------------------------------------------
	pkg.scripts = pkg.scripts || {};
	pkg.scripts.install = pkg.scripts.install || "";

	pkg.scripts.install.split( "&&" ).forEach( function( scrp ) {
		// -----------------------------------------------------
		// Clear out any older install scripts for svn-npm-crutch
		// -----------------------------------------------------
		if( -1 === scrp.indexOf( "node_modules/svn-npm-crutch" ) ) {
			scrp = scrp.trim();
			if( scrp.length > 0 ) {
				installScripts.push( scrp );
			}
		}
	});

	if( "install" === hook ) {
		helperScript = "node ./node_modules/svn-npm-crutch/lib/svn-npm-crutch.js";
		installScripts.push( helperScript );
	}

	pkg.scripts.install = installScripts.join( " && " );
	fs.writeFileSync( appPkg, JSON.stringify( pkg, null, "\t" ) );
};


{'fraction_non_alphanumeric': 0.3241350906095552, 'fraction_numerical': 0.0016474464579901153, 'mean_word_length': 1.5703703703703704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2931017', 'n_tokens_mistral': 804, 'n_tokens_neox': 731, 'n_words': 157}