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

var amok = require('./');
var async = require('async');
var cmd = require('commander');
var fs = require('fs');
var path = require('path');
var temp = require('temp');
var repl = require('repl');
var util = require('util');

var pkg = require('./package.json');

cmd.usage('[options] <script>');
cmd.version(pkg.version);

cmd.option('--host <HOST>', 'specify http host', 'localhost');
cmd.option('--port <PORT>', 'specify http port', 9966);

cmd.option('--debugger-host <HOST>', 'specify debugger host', 'localhost');
cmd.option('--debugger-port <PORT>', 'specify debugger port', 9222);

cmd.option('-i, --interactive', 'enable interactive mode');

cmd.option('--client <CMD>', 'specify the client to spawn');
cmd.option('--compiler <CMD>', 'specify the compiler to spawn');

cmd.option('-v, --verbose', 'enable verbose logging mode');

cmd.parse(process.argv);

cmd.cwd = process.cwd();

function compiler(callback, data) {
  if (cmd.compiler) {
    if (cmd.verbose) {
      console.info('Spawning compiler...');
    }

    temp.track();
    temp.mkdir('amok', function(error, dirpath) {
      if (error) {
        return callback(error);
      }

      var compiler = amok.compile(cmd, function(error, stdout, stderr) {
        if (error) {
          return callback(error);
        }

        stdout.pipe(process.stdout);
        stderr.pipe(process.stderr);

        cmd.scripts = {
          'bundle.js': compiler.output,
        };

        callback(null, compiler);
      });
    });
<commit_msg>Remove obsolete temp dir creation<commit_after>#!/usr/bin/env node

var amok = require('./');
var async = require('async');
var cmd = require('commander');
var fs = require('fs');
var path = require('path');
var temp = require('temp');
var repl = require('repl');
var util = require('util');

var pkg = require('./package.json');

cmd.usage('[options] <script>');
cmd.version(pkg.version);

cmd.option('--host <HOST>', 'specify http host', 'localhost');
cmd.option('--port <PORT>', 'specify http port', 9966);

cmd.option('--debugger-host <HOST>', 'specify debugger host', 'localhost');
cmd.option('--debugger-port <PORT>', 'specify debugger port', 9222);

cmd.option('-i, --interactive', 'enable interactive mode');

cmd.option('--client <CMD>', 'specify the client to spawn');
cmd.option('--compiler <CMD>', 'specify the compiler to spawn');

cmd.option('-v, --verbose', 'enable verbose logging mode');

cmd.parse(process.argv);

cmd.cwd = process.cwd();

function compiler(callback, data) {
  if (cmd.compiler) {
    if (cmd.verbose) {
      console.info('Spawning compiler...');
    }

    var compiler = amok.compile(cmd, function(error, stdout, stderr) {
      if (error) {
        return callback(error);
      }

      stdout.pipe(process.stdout);
      stderr.pipe(process.stderr);

      cmd.scripts = {
        'bundle.js': compiler.output,
      };

      callback(null, compiler);
    });


{'fraction_non_alphanumeric': 0.19334012911994564, 'fraction_numerical': 0.0054366292898402994, 'mean_word_length': 3.5502318392581143, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '147538', 'n_tokens_mistral': 948, 'n_tokens_neox': 923, 'n_words': 232}