Swap-Aggregator-Subgraph/node_modules/gluegun/build/loaders/config-loader.js
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

18 lines
638 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var cosmiconfig_1 = require("cosmiconfig");
/**
* Loads the config for the app via CosmicConfig by searching in a few places.
*
* @param name The base name of the config to load.
* @param src The directory to look in.
*/
function loadConfig(name, src) {
// attempt to load
var cosmic = cosmiconfig_1.cosmiconfigSync(name || '').search(src || '');
// use what we found or fallback to an empty object
var config = (cosmic && cosmic.config) || {};
return config;
}
exports.loadConfig = loadConfig;
//# sourceMappingURL=config-loader.js.map