This commit is contained in:
Cheng Zhao 2015-11-12 16:28:22 +08:00
Родитель ce0167756e
Коммит c2c09daa23
6 изменённых файлов: 84 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,47 @@
# Import common modules.
module.exports = require '../../../../common/api/lib/exports/electron'
Object.defineProperties module.exports,
# Browser side modules, please sort with alphabet order.
app:
enumerable: true
get: -> require '../app'
autoUpdater:
enumerable: true
get: -> require '../auto-updater'
BrowserWindow:
enumerable: true
get: -> require '../browser-window'
contentTracing:
enumerable: true
get: -> require '../content-tracing'
dialog:
enumerable: true
get: -> require '../dialog'
ipcMain:
enumerable: true
get: -> require '../ipc-main'
globalShortcut:
enumerable: true
get: -> require '../global-shortcut'
Menu:
enumerable: true
get: -> require '../menu'
MenuItem:
enumerable: true
get: -> require '../menu-item'
powerMonitor:
enumerable: true
get: -> require '../power-monitor'
powerSaveBlocker:
enumerable: true
get: -> require '../power-save-blocker'
protocol:
enumerable: true
get: -> require '../protocol'
screen:
enumerable: true
get: -> require '../screen'
tray:
enumerable: true
get: -> require '../tray'

Просмотреть файл

@ -17,6 +17,7 @@ require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')
# Electron's built-in libraries.
globalPaths = Module.globalPaths
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib', 'exports')
if process.platform is 'win32'
# Redirect node's console to use our own implementations, since node can not

Просмотреть файл

@ -0,0 +1,15 @@
Object.defineProperties exports,
# Common modules, please sort with alphabet order.
clipboard:
# Must be enumerable, otherwise it woulde be invisible to remote module.
enumerable: true
get: -> require '../clipboard'
crashRepoter:
enumerable: true
get: -> require '../crash-reporter'
nativeImage:
enumerable: true
get: -> require '../native-image'
shell:
enumerable: true
get: -> require '../shell'

Просмотреть файл

@ -0,0 +1,17 @@
# Import common modules.
module.exports = require '../../../../common/api/lib/exports/electron'
Object.defineProperties module.exports,
# Renderer side modules, please sort with alphabet order.
ipcRenderer:
enumerable: true
get: -> require '../ipc-renderer'
remote:
enumerable: true
get: -> require '../remote'
screen:
enumerable: true
get: -> require '../screen'
webFrame:
enumerable: true
get: -> require '../web-frame'

Просмотреть файл

@ -17,6 +17,7 @@ require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')
# of Atom's built-in libraries.
globalPaths = Module.globalPaths
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib', 'exports')
# The global variable will be used by ipc for event dispatching
v8Util = process.atomBinding 'v8_util'

Просмотреть файл

@ -16,6 +16,7 @@
'atom/browser/api/lib/browser-window.coffee',
'atom/browser/api/lib/content-tracing.coffee',
'atom/browser/api/lib/dialog.coffee',
'atom/browser/api/lib/exports/electron.coffee',
'atom/browser/api/lib/global-shortcut.coffee',
'atom/browser/api/lib/ipc.coffee',
'atom/browser/api/lib/ipc-main.coffee',
@ -38,6 +39,7 @@
'atom/common/api/lib/clipboard.coffee',
'atom/common/api/lib/crash-reporter.coffee',
'atom/common/api/lib/deprecate.coffee',
'atom/common/api/lib/exports/electron.coffee',
'atom/common/api/lib/native-image.coffee',
'atom/common/api/lib/shell.coffee',
'atom/common/lib/init.coffee',
@ -50,6 +52,7 @@
'atom/renderer/lib/web-view/web-view.coffee',
'atom/renderer/lib/web-view/web-view-attributes.coffee',
'atom/renderer/lib/web-view/web-view-constants.coffee',
'atom/renderer/api/lib/exports/electron.coffee',
'atom/renderer/api/lib/ipc.coffee',
'atom/renderer/api/lib/ipc-renderer.coffee',
'atom/renderer/api/lib/remote.coffee',