<commit_before>/*global __dirname: true, exports: true, process: true, require: true */
/*jslint onevar: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, newcap: true, immed: true */

require.paths.unshift(__dirname);
require.paths.unshift(__dirname + '/../deps');

var fs        = require('fs'),
    path      = require('path'),

    cache     = require('solder/cache'),
    Component = require('solder/component'),
    version   = require('solder/version');

function Solderer (configFile) {
  configFile = configFile || './solder-config.js';

  try {
    this.config = require(fs.realpathSync(configFile)).config;
  } catch (e) {
    throw new Error('Missing or invalid configuration file: ' + configFile);
  }

  this.cache          = cache.create();
  this.cdn            = null;
  this.componentCache = {};
}

Solderer.prototype.component = function (name) {
  var css  = [],
      js   = [],
      self = this,
      component, definition, requires;

  if (this.componentCache[name]) {
    return this.componentCache[name];
  }<commit_msg>Report acutal error when unable to load config file<commit_after>/*global __dirname: true, exports: true, process: true, require: true */
/*jslint onevar: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, newcap: true, immed: true */

require.paths.unshift(__dirname);
require.paths.unshift(__dirname + '/../deps');

var fs        = require('fs'),
    path      = require('path'),

    cache     = require('solder/cache'),
    Component = require('solder/component'),
    version   = require('solder/version');

function Solderer (configFile) {
  configFile = configFile || './solder-config.js';
  
  try {
    this.config = require(fs.realpathSync(configFile)).config;
  } catch (e) {
    throw new Error('Missing or invalid configuration file: ' + configFile + 
        '; Error: ' + e);
  }

  this.cache          = cache.create();
  this.cdn            = null;
  this.componentCache = {};
}

Solderer.prototype.component = function (name) {
  var css  = [],
      js   = [],
      self = this,
      component, definition, requires;

  if (this.componentCache[name]) {
    return this.componentCache[name];
  }
{'fraction_non_alphanumeric': 0.15025194686211635, 'fraction_numerical': 0.0, 'mean_word_length': 3.1052631578947367, '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': '5673000', 'n_tokens_mistral': 679, 'n_tokens_neox': 660, 'n_words': 164}