<commit_before>'use strict';

var path = require('path');
var utils = require('../../utils');

module.exports = function(app, base) {
  base.create('files', {
    renameKey: function (key) {
      return path.basename(key);
    }
  });

  var glob = base.get('argv.files');
  if (glob) {
    glob = glob.split(',');
  } else {
    glob = ['*', 'lib/*', 'bin/*'];
  }

  return function(cb) {
    base.files(glob, {dot: true, ignore: ['.DS_Store']});
    base.emit('loaded', base.files);
    cb();
  };
};
<commit_msg>use glob instead of loader<commit_after>'use strict';

var fs = require('fs');
var path = require('path');
var utils = require('../../utils');

module.exports = function(app, base) {
  base.create('files', {
    renameKey: function (key) {
      return path.basename(key);
    }
  });

  var glob = base.get('argv.files');
  if (glob) {
    glob = glob.split(',');
  } else {
    glob = ['*', 'lib/*', 'bin/*'];
  }

  var opts = {dot: true, realpath: true, ignore: ['**/.DS_Store', '**/.git']};

  return function(cb) {
    utils.glob.sync(glob, opts).forEach(function(fp) {
      base.file(fp, {content: fs.readFileSync(fp)});
    });

    base.emit('loaded', base.files);
    cb();
  };
};

{'fraction_non_alphanumeric': 0.23057851239669422, 'fraction_numerical': 0.0, 'mean_word_length': 3.0366666666666666, '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': '7355797', 'n_tokens_mistral': 435, 'n_tokens_neox': 430, 'n_words': 92}