spee.ch/client/pages/index.js

13 lines
319 B
JavaScript
Raw Normal View History

2018-03-22 01:35:51 +01:00
const Path = require('path');
2018-03-22 05:53:25 +01:00
const { getSubDirectoryNames } = require('build/getFolderNames.js');
2018-03-22 01:35:51 +01:00
const thisFolder = Path.resolve(__dirname, 'client/pages/');
2018-03-22 05:53:25 +01:00
let modules = {};
getSubDirectoryNames(thisFolder)
.forEach((name) => {
modules[name] = require(`./${name}`).default;
});
module.exports = modules;