<commit_before>/* jshint esversion:6, node:true  */

'use strict';

const path = require('path');
const globby = require('globby');
const fs = require('fs');
const _ = require('lodash');
const argv = require('yargs').argv;

module.exports = modulesTracker;

function modulesTracker() {
  
  const pluginsPath = path.join(__dirname, '../', 'plugins');

  const modules = pluginsPath + '/**/index.js';
  const subModules = pluginsPath + '/**/*.module.js';
  const testModules = `${pluginsPath}/**/*-test.module.js`;
  const serverStartModule = pluginsPath + '/server/index.js';

  const srcPaths = [
    modules,
    subModules
  ];

  if (process.env.UNIT_TEST) {
    srcPaths.push(`!${serverStartModule}`);
  } else {
    srcPaths.push(`!${testModules}`);
  }

  const appModules = globby.sync(srcPaths);

  return appModules;
}<commit_msg>better use ecma6 strings<commit_after>/* jshint esversion:6, node:true  */

'use strict';

const path = require('path');
const globby = require('globby');
const fs = require('fs');
const _ = require('lodash');
const argv = require('yargs').argv;

module.exports = modulesTracker;

function modulesTracker() {

  const pluginsPath = path.join(__dirname, '../', 'plugins');

  const modules = `${pluginsPath}/**/index.js`;
  const subModules = `${pluginsPath}/**/*.module.js`;
  const testModules = `${pluginsPath}/**/*-test.module.js`;
  const serverStartModule = `${pluginsPath}/server/index.js`;

  const srcPaths = [
    modules,
    subModules
  ];

  if (process.env.UNIT_TEST) {
    srcPaths.push(`!${serverStartModule}`);
  } else {
    srcPaths.push(`!${testModules}`);
  }

  const appModules = globby.sync(srcPaths);

  return appModules;
}
{'fraction_non_alphanumeric': 0.17998815867377146, 'fraction_numerical': 0.0017761989342806395, 'mean_word_length': 4.216049382716049, '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': '2847003', 'n_tokens_mistral': 555, 'n_tokens_neox': 560, 'n_words': 114}