const parseArgs = require('minimist');
const fs = require('fs');
const assert = require('assert');
const constant = require('./constant');

const BASE_CONF_DIR = '/home/kingsome/opensource/conf/prod/prod';
const BASE_RES_DIR = '/home/kingsome/opensource/res/prod/prod';

class CfgChecker {

  constructor() {
    this.projHash = {};
  }

  async init() {
    await this.addProj(
      constant.PROJ_WEB3BCSPIDER,
      BASE_CONF_DIR + '/game2006/web3bcspider_prod/',
      '');
  }

  async addProj(projName, confDir, resDir) {
    const proj = new(require('./projects/' + projName));
    proj.confDir = confDir;
    proj.resDir = resDir;
    this.projHash[projName] = proj;
    console.log('addProj ', projName, confDir, resDir);
  }

}

(new CfgChecker).init();
