<commit_before>"use strict";

var DeploymentClass = require('./deployment/deployment'),
    Type = require('./deployment/types/type'),
    Html = require('./deployment/types/html'),
    CompilerClass = require('./compiler'),
    ConfigClass = require('./config'),
    ModuleNames = require('./processors/module-names'),
    TreeClass = require('./tree'),
    Messages = require('./messages'),
    Injector = require('./inject');



var counter = 1;



function compile(Config, Compiler, Deployment, Tree) {
  var n = counter++,
      start = new Date(),
      index = Config.getIndexHtml();

  Messages.start();

  if (index) {
    Injector.clear(index);
  }

  Messages.write('start', {
    n: n
  });

  var onlyFiles = true,
      list = Tree.get(onlyFiles);

  Messages.write('compile');

  Messages.write('clean');
  Deployment.clean();

  return Compiler.compile(list).then(function(e) {

    Messages.write('deploy');
    Deployment.run(list);

    Messages.write('processing');
    var processed = Compiler.process();

    Compiler.save(processed);

    Messages.write('finish', {
      n: n,
      elapsed: (new Date() - start) / 1000
    });

    //Messages.write('backup');
    //Deployment.backup();
  }).catch(function(e) {

    //Messages.write('restore');
    //Deployment.restore();

    if (index) {
      Injector.add(index, e);
    }

    Messages.write('failed', {
      n: n
    });
<commit_msg>[update] hotfix: tmp remove Deploymwnt:clean<commit_after>"use strict";

var DeploymentClass = require('./deployment/deployment'),
    Type = require('./deployment/types/type'),
    Html = require('./deployment/types/html'),
    CompilerClass = require('./compiler'),
    ConfigClass = require('./config'),
    ModuleNames = require('./processors/module-names'),
    TreeClass = require('./tree'),
    Messages = require('./messages'),
    Injector = require('./inject');



var counter = 1;



function compile(Config, Compiler, Deployment, Tree) {
  var n = counter++,
      start = new Date(),
      index = Config.getIndexHtml();

  Messages.start();

  if (index) {
    Injector.clear(index);
  }

  Messages.write('start', {
    n: n
  });

  var onlyFiles = true,
      list = Tree.get(onlyFiles);

  Messages.write('compile');

  Messages.write('clean');
  //Deployment.clean();

  return Compiler.compile(list).then(function(e) {

    Messages.write('deploy');
    Deployment.run(list);

    Messages.write('processing');
    var processed = Compiler.process();

    Compiler.save(processed);

    Messages.write('finish', {
      n: n,
      elapsed: (new Date() - start) / 1000
    });

    //Messages.write('backup');
    //Deployment.backup();
  }).catch(function(e) {

    //Messages.write('restore');
    //Deployment.restore();

    if (index) {
      Injector.add(index, e);
    }

    Messages.write('failed', {
      n: n
    });

{'fraction_non_alphanumeric': 0.18080279232111693, 'fraction_numerical': 0.0034904013961605585, 'mean_word_length': 2.964038727524205, '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': '1143255', 'n_tokens_mistral': 932, 'n_tokens_neox': 852, 'n_words': 166}