dee9aef975
* Make it possible to disable a module for a renderer * Put DesktopCapturer API under a build flag The name is "enable_desktop_capturer". Enabled by default.
21 lines
441 B
JavaScript
21 lines
441 B
JavaScript
const common = require('../../../common/api/exports/electron')
|
|
const moduleList = require('../module-list')
|
|
|
|
// Import common modules.
|
|
common.defineProperties(exports)
|
|
|
|
for (const {
|
|
name,
|
|
file,
|
|
enabled = true,
|
|
private: isPrivate = false
|
|
} of moduleList) {
|
|
if (!enabled) {
|
|
continue
|
|
}
|
|
|
|
Object.defineProperty(exports, name, {
|
|
enumerable: !isPrivate,
|
|
get: () => require(`../${file}`)
|
|
})
|
|
}
|