code: function parseDir(base) {
    const stats = fs.statSync(base);
    let packageFileHandler;
  
    if (!stats.isDirectory()) {
      throw new Error(`${base} is not a directory`);
    }
  
    try {
      fs.statSync(`${base}/deploy.json`);
      packageFileHandler = _.partial(parseDeployjson, `${base}/deploy.json`);
    }
    catch (ex) {
      try {
        fs.statSync(`${base}/package.js`);
        packageFileHandler = _.partial(parsePackagejs, `${base}/package.js`);
      }
      catch (_ex) {
        const message = `could not find 'deploy.json' or 'package.js' in directory '${base}'`;
        throw new Error(message);
      }
    }
  
    return packageFileHandler();
  }
docs: ///////////////////////////////////////////////////////////