fix(main): globa.resourcePath now resourcePath

This commit is contained in:
Evan Morikawa 2015-11-18 17:40:39 -08:00
parent 53bd5ab2d0
commit 2699888e47
3 changed files with 210 additions and 209 deletions

View file

@ -147,12 +147,12 @@ parseCommandLine = ->
# want to test.
if test and toString.call(test) is "[object String]"
if test is "core"
specDirectory = path.join(global.devResourcePath, "spec")
specDirectory = path.join(devResourcePath, "spec")
else if test is "window"
specDirectory = path.join(global.devResourcePath, "spec")
specDirectory = path.join(devResourcePath, "spec")
specsOnCommandLine = false
else
specDirectory = path.resolve(path.join(global.devResourcePath, "internal_packages", test))
specDirectory = path.resolve(path.join(devResourcePath, "internal_packages", test))
devMode = true if test
resourcePath ?= devResourcePath if devMode

View file

@ -1,3 +1,5 @@
// Generated by CoffeeScript 1.9.2
(function() {
var app, fs, handleStartupEventWithSquirrel, normalizeDriveLetterName, optimist, parseCommandLine, path, setupCompileCache, setupCrashReporter, setupErrorLogger, setupNylasHome, start;
global.shellStartTime = Date.now();
@ -170,12 +172,12 @@ parseCommandLine = function() {
} else {
if (test && toString.call(test) === "[object String]") {
if (test === "core") {
specDirectory = path.join(global.devResourcePath, "spec");
specDirectory = path.join(devResourcePath, "spec");
} else if (test === "window") {
specDirectory = path.join(global.devResourcePath, "spec");
specDirectory = path.join(devResourcePath, "spec");
specsOnCommandLine = false;
} else {
specDirectory = path.resolve(path.join(global.devResourcePath, "internal_packages", test));
specDirectory = path.resolve(path.join(devResourcePath, "internal_packages", test));
}
}
}
@ -216,5 +218,4 @@ parseCommandLine = function() {
start();
// ---
// generated by coffee-script 1.9.2
}).call(this);

View file

@ -68,8 +68,8 @@ class WindowManager
else
if @devMode
try
bootstrapScript = require.resolve(path.join(global.devResourcePath, 'src', 'window-bootstrap'))
resourcePath = global.devResourcePath
bootstrapScript = require.resolve(path.join(@resourcePath, 'src', 'window-bootstrap'))
resourcePath = @resourcePath
bootstrapScript ?= require.resolve('../window-bootstrap')
resourcePath ?= @resourcePath