// Generated by LiveScript 1.2.0
(function(){
  var FileIO, GlobalConfig, gconf, BaseConfigLoader, toString$ = {}.toString;
  FileIO = require('../../../util/file-io');
  GlobalConfig = require('../../../global-config');
  gconf = new GlobalConfig;
  module.exports = BaseConfigLoader = (function(){
    BaseConfigLoader.displayName = 'BaseConfigLoader';
    var prototype = BaseConfigLoader.prototype, constructor = BaseConfigLoader;
    importAll$(prototype, arguments[0]);
    function BaseConfigLoader(name, path, options){
      this.name = name;
      this.path = path;
      this.options = options != null
        ? options
        : {};
      this.path || (this.path = gconf.location('components.dir'));
      this.validate();
      this;
    }
    prototype.validate = function(){
      if (toString$.call(this.name).slice(8, -1) !== 'String') {
        throw new Error("Name of config to load must be a String, was: " + this.name);
      }
    };
    return BaseConfigLoader;
  }(FileIO));
  function importAll$(obj, src){
    for (var key in src) obj[key] = src[key];
    return obj;
  }
}).call(this);
