electron/browser/api/lib/app.coffee
2013-06-19 13:49:58 +08:00

17 lines
442 B
CoffeeScript

bindings = process.atomBinding 'app'
EventEmitter = require('events').EventEmitter
Application = bindings.Application
Application::__proto__ = EventEmitter.prototype
app = new Application
app.getHomeDir = ->
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
app.commandLine =
appendSwitch: bindings.appendSwitch,
appendArgument: bindings.appendArgument
# Only one App object pemitted.
module.exports = app