electron/lib/common/api/exports/electron.js

14 lines
374 B
JavaScript
Raw Normal View History

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) {
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
}
}
return Object.defineProperties(exports, descriptors)
2016-03-25 19:50:33 +00:00
}