'use strict';

var fs = require('fs'), files = fs.readdirSync('./lib/resources');
var resources = {}, resource, i = 0, l = files.length;

for(; i < l; i++) {
  resource = files[i];

  if(resource === 'index.js'        ||
     resource === 'resourceBase.js' ||
     resource.indexOf('.js') < 0) {
    continue;
  }

  resource = resource.replace('.js', '');
  resources[resource] = require('./' + resource);
}

module.exports = resources;

'use strict';

var fs = require('fs'), files = fs.readdirSync(__dirname);
var resources = {}, resource, i = 0, l = files.length;

for(; i < l; i++) {
  resource = files[i];

  if(resource === 'index.js'        ||
     resource === 'resourceBase.js' ||
     resource.indexOf('.js') < 0) {
    continue;
  }

  resource = resource.replace('.js', '');
  resources[resource] = require('./' + resource);
}

module.exports = resources;

Fix resource loader file path being relative to running script. Use current directory global instead.
Fix resource loader file path being relative to running script. Use current directory global instead.
