<commit_before>/*
 * periodic
 * http://github.com/typesettin/periodic
 *
 * Copyright (c) 2014 <NAME>. All rights reserved.
 */

'use strict';

var fs = require('fs-extra'),
		path = require('path'),
		commandprompt = require('prompt'),
		npm = require('npm'),
		originalnodemoduleslocation = path.resolve(process.cwd(),'../../node_modules'),
		originallocation = path.resolve(process.cwd(),'../../node_modules','periodicjs'),
		newlocation = path.resolve(process.cwd(),'../../periodicjs'),
		schema = {
	    properties: {
	      auto_clean_up: {
	        message: 'Do you want to remove node_modules and copy periodicjs to site root? (Yes or No)',
	        required: true
	      }
	    }
	  };

npm.load({
	'strict-ssl': false,
	'production': true,
},function (err) {
	if (err) {
		console.error(err);
	}
	else {
		npm.commands.install([
			'periodicjs.ext.admin@1.0.3',
			'periodicjs.ext.dbseed@1.0.2',
			'periodicjs.ext.default_routes@1.0.3',
			'periodicjs.ext.install@1.0.2',
			'periodicjs.ext.login@1.1.10',
			'periodicjs.ext.mailer@1.3.1',
			'periodicjs.ext.scheduled_content@1.0.1',
			'periodicjs.ext.user_access_control@1.0.2',
			],
		function (err, data) {
			if (err) {
				console.error(err);
			}
			else {
				console.log(data);

				fs.open(originallocation,'r',function(err){
					if(err){
						console.log('Installed Periodicjs');
						process.exit(0);
					}
					else{
						console.log('\u0007');
						commandprompt.start();
						commandprompt.get(schema, function (err, result) {
						  if(err){
								console.error(err);
								process.exit(0);
							}
							else{
								if(result.auto_clean_up.match(/y/gi)){
<commit_msg>fixing install<commit_after>/*
 * periodic
 * http://github.com/typesettin/periodic
 *
 * Copyright (c) 2014 <NAME>. All rights reserved.
 */

'use strict';

var fs = require('fs-extra'),
		path = require('path'),
		commandprompt = require('prompt'),
		npm = require('npm'),
		originalnodemoduleslocation = path.resolve(process.cwd(),'../../node_modules'),
		originallocation = path.resolve(process.cwd(),'../../node_modules','periodicjs'),
		newlocation = path.resolve(process.cwd(),'../../periodicjs'),
		schema = {
	    properties: {
	      auto_clean_up: {
	        message: 'Do you want to remove node_modules and copy periodicjs to site root? (Yes or No)',
	        required: true
	      }
	    }
	  };

npm.load({
	'strict-ssl': false,
	'production': true,
},function (err) {
	if (err) {
		console.error(err);
	}
	else {
		npm.commands.install([
			'periodicjs.ext.admin@1.0.3',
			'periodicjs.ext.dbseed@1.0.2',
			'periodicjs.ext.default_routes@1.0.3',
			'periodicjs.ext.install@1.0.2',
			'periodicjs.ext.login@1.1.10',
			'periodicjs.ext.mailer@1.3.1',
			'periodicjs.ext.scheduled_content@1.0.1',
			'periodicjs.ext.user_access_control@1.0.2',
			],
		function (err 
			//,data
			) {
			if (err) {
				console.error(err);
			}
			else {
				// console.log(data);

				fs.open(originallocation,'r',function(err){
					if(err){
						console.log('Installed Periodicjs');
						process.exit(0);
					}
					else{
						console.log('\u0007');
						commandprompt.start();
						commandprompt.get(schema, function (err, result) {
						  if(err){
								console.error(err);
								process.exit(0);
							}
							else{
								if(result.auto_clean_up.match(/y/gi)){

{'fraction_non_alphanumeric': 0.18073010173548773, 'fraction_numerical': 0.020945541591861162, 'mean_word_length': 2.838117106773823, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2179921', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1175, 'n_words': 187}