2017-03-06 14:58:10 +00:00
|
|
|
const moduleList = require('../module-list')
|
|
|
|
|
2016-01-14 18:35:29 +00:00
|
|
|
// Attaches properties to |exports|.
|
2016-03-25 19:50:33 +00:00
|
|
|
exports.defineProperties = function (exports) {
|
2017-03-06 14:58:10 +00:00
|
|
|
const descriptors = {}
|
|
|
|
for (const module of moduleList) {
|
|
|
|
descriptors[module.name] = {
|
|
|
|
enumerable: !module.private,
|
|
|
|
get: () => require(`../${module.file}`)
|
2016-01-12 02:40:23 +00:00
|
|
|
}
|
2017-03-06 14:58:10 +00:00
|
|
|
}
|
|
|
|
return Object.defineProperties(exports, descriptors)
|
2016-03-25 19:50:33 +00:00
|
|
|
}
|