mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 12:23:05 +00:00
17 lines
404 B
JavaScript
17 lines
404 B
JavaScript
'use strict';
|
|
|
|
const { join } = require('path');
|
|
const { existsSync } = require('fs-extra');
|
|
const loadConfig = require('../load/load-config-files');
|
|
|
|
module.exports = async ({ dir }) => {
|
|
if (!existsSync(join(dir, 'config'))) {
|
|
throw new Error(
|
|
`Missing config folder. Please create one in your app root directory`
|
|
);
|
|
}
|
|
|
|
const { config } = await loadConfig(dir);
|
|
return config;
|
|
};
|