UNPKG

604 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.loadConfig = void 0;
4const core_1 = require("@oclif/core");
5/**
6 * loads CLI plugin/multi config
7 * @param {loadConfig.Options} opts options
8 * @return {Promise<Interfaces.Config>} config
9 */
10function loadConfig(opts = {}) {
11 return {
12 async run(ctx) {
13 ctx.config = await core_1.Config.load(opts.root || loadConfig.root);
14 return ctx.config;
15 },
16 };
17}
18exports.loadConfig = loadConfig;
19(function (loadConfig) {
20})(loadConfig = exports.loadConfig || (exports.loadConfig = {}));