mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
16 lines
396 B
CoffeeScript
16 lines
396 B
CoffeeScript
# This file is the first thing loaded on startup.
|
|
|
|
modules = {}
|
|
this.require = (path) ->
|
|
console.log(path)
|
|
return modules[path] if modules[path]
|
|
|
|
root = OSX.NSBundle.mainBundle.resourcePath + '/HTML/'
|
|
file = OSX.NSString.stringWithContentsOfFile "#{root}/#{path}.js"
|
|
exports = {}
|
|
eval "(function(exports){#{file}}).call(exports, exports);"
|
|
|
|
modules[path] = exports
|
|
modules[path]
|
|
|