@strapi/strapi
Version:
An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite
23 lines (17 loc) • 624 B
JavaScript
;
var path = require('node:path');
var files = require('./files.js');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var path__default = /*#__PURE__*/_interopDefault(path);
const getUserConfig = async (fileNames, ctx)=>{
for (const file of fileNames){
const filePath = path__default.default.join(ctx.appDir, 'src', 'admin', file);
const configFile = await files.loadFile(filePath);
if (configFile) {
return configFile;
}
}
return undefined;
};
exports.getUserConfig = getUserConfig;
//# sourceMappingURL=config.js.map