Use __dirname when setting globalPaths

This commit is contained in:
Cheng Zhao 2015-02-13 12:55:06 +08:00
Родитель 3f3e66916a
Коммит 0b8efc434d
3 изменённых файлов: 4 добавлений и 3 удалений

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

@ -21,7 +21,7 @@ process.argv.splice startMark, endMark - startMark + 1
# Add browser/api/lib to require's search paths,
# which contains javascript part of Atom's built-in libraries.
globalPaths = module.globalPaths
globalPaths.push path.join process.resourcesPath, 'atom', 'browser', 'api', 'lib'
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
# Import common settings.
require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')

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

@ -12,7 +12,7 @@ process.atomBinding = (name) ->
# Add common/api/lib to module search paths.
globalPaths = Module.globalPaths
globalPaths.push path.join(process.resourcesPath, 'atom', 'common', 'api', 'lib')
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
# setImmediate and process.nextTick makes use of uv_check and uv_prepare to
# run the callbacks, however since we only run uv loop on requests, the

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

@ -15,9 +15,10 @@ process.argv.splice 1, 1
# Add renderer/api/lib to require's search paths, which contains javascript part
# of Atom's built-in libraries.
globalPaths = Module.globalPaths
globalPaths.push path.join(process.resourcesPath, 'atom', 'renderer', 'api', 'lib')
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
# And also app.
globalPaths.push path.join(process.resourcesPath, 'app')
globalPaths.push path.join(process.resourcesPath, 'app.asar')
# Import common settings.
require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')