code: function locateConfig(url) {
    let configpath = '';
  
    function check(dir) {
      // Support js, json, and package.json
      const urljs = path.join(dir, DEFAULT_MANIFEST.js);
      const urljson = path.join(dir, DEFAULT_MANIFEST.json);
      const urlpkgjson = path.join(dir, DEFAULT_MANIFEST.pkgjson);
      let urlFinal;
  
      if (exists((urlFinal = urljs)) || exists((urlFinal = urljson)) || exists((urlFinal = urlpkgjson))) {
        return urlFinal;
      }
      return '';
    }
  
    if (url) {
      configpath = path.resolve(url);
  
      try {
        // Try default file name if passed directory
        if (!path.extname(configpath).length || fs.statSync(configpath).isDirectory()) {
          configpath = check(configpath);
          if (!configpath) throw Error('no default found');
        }
      } catch (err) {
        throw Error(strong('buddy') + ' config not found in ' + strong(path.dirname(url)));
      }
  
      // No url specified
    } else {
      try {
        // Find the first instance of a DEFAULT file based on the current working directory
        configpath = hunt(
          process.cwd(),
          (resource, stat) => {
            if (stat.isFile()) {
              const basename = path.basename(resource);
  
              return basename == DEFAULT_MANIFEST.js ||
                basename == DEFAULT_MANIFEST.json ||
                basename == DEFAULT_MANIFEST.pkgjson;
            }
          },
          true
        );
      } catch (err) {
        if (!configpath) throw Error(strong('buddy') + ' config not found');
      }
    }
  
    return configpath;
  }
docs: Locate the configuration file
  Walks the directory tree if no file/directory specified
  @param {String} [url]
  @returns {String}