You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
512 B
JavaScript
17 lines
512 B
JavaScript
'use strict';
|
|
|
|
require('dotenv').config({ path: `.env.${process.env.NODE_ENV || 'production'}` });
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const config = {};
|
|
const basePath = path.join(__dirname, 'components');
|
|
|
|
// Require all the files from the components folder and add the imported to a unique configuration object
|
|
fs.readdirSync(basePath).forEach(file => {
|
|
const componentConfig = require(path.join(basePath, file));
|
|
Object.assign(config, componentConfig);
|
|
});
|
|
|
|
module.exports = config;
|