Skip to content

Commit 9b0fd74

Browse files
committed
deploy: 0b2f639
1 parent fd92f56 commit 9b0fd74

39 files changed

Lines changed: 760 additions & 734 deletions

‎LiveDevelopment/LiveDevMultiBrowser.js‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -689,17 +689,7 @@ define(function (require, exports, module) {
689689
// TODO: need to run _onDocumentChange() after load if doc != currentDocument here? Maybe not, since activeEditorChange
690690
// doesn't trigger it, while inline editors can still cause edits in doc other than currentDoc...
691691
_getInitialDocFromCurrent().done(function (doc) {
692-
var prepareServerPromise = (doc && _prepareServer(doc)) || new $.Deferred().reject(),
693-
otherDocumentsInWorkingFiles;
694-
695-
if (doc && !doc._masterEditor) {
696-
otherDocumentsInWorkingFiles = MainViewManager.getWorkingSetSize(MainViewManager.ALL_PANES);
697-
MainViewManager.addToWorkingSet(MainViewManager.ACTIVE_PANE, doc.file);
698-
699-
if (!otherDocumentsInWorkingFiles) {
700-
CommandManager.execute(Commands.CMD_OPEN, { fullPath: doc.file.fullPath });
701-
}
702-
}
692+
var prepareServerPromise = (doc && _prepareServer(doc)) || new $.Deferred().reject();
703693

704694
// wait for server (StaticServer, Base URL or file:)
705695
prepareServerPromise

loggerConfig.js renamed to appConfig.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Autogenerated by gulp scripts. Do not edit
2-
const AppConfig = {
2+
window.AppConfig = {
33
"config": {
44
"app_title": "Phoenix",
55
"app_name_about": "Phoenix",
@@ -20,7 +20,7 @@ const AppConfig = {
2020
"extension_url": "https://s3.amazonaws.com/extend.brackets/{0}/{0}-{1}.zip",
2121
"extension_store_url": "https://store.core.ai/src/",
2222
"linting.enabled_by_default": true,
23-
"build_timestamp": "2023-01-06T18:46:33.232Z",
23+
"build_timestamp": "2023-01-07T14:01:04.716Z",
2424
"googleAnalyticsID": "G-P4HJFPDB76",
2525
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
2626
"coreAnalyticsID": "phoenix",
@@ -30,7 +30,7 @@ const AppConfig = {
3030
"bugsnagEnv": "development"
3131
},
3232
"name": "Phoenix",
33-
"version": "3.0.10-19050",
33+
"version": "3.0.10-19056",
3434
"apiVersion": "3.0.10",
3535
"homepage": "https://core.ai",
3636
"issues": {
@@ -49,4 +49,3 @@ const AppConfig = {
4949
}
5050
]
5151
};
52-
export default AppConfig;

‎assets/default-project/en.zip‎

0 Bytes
Binary file not shown.

‎assets/sample-projects/HTML5.zip‎

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

‎assets/sample-projects/explore.zip‎

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

‎brackets.js‎

Lines changed: 85 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,86 @@ define(function (require, exports, module) {
301301
_removePhoenixLoadingOverlay();
302302
});
303303

304+
function _startupBrackets() {
305+
// Load all extensions. This promise will complete even if one or more
306+
// extensions fail to load.
307+
const extensionPathOverride = params.get("extensions"); // used by unit tests
308+
const extensionLoaderPromise = ExtensionLoader.init(extensionPathOverride ? extensionPathOverride.split(",") : null);
309+
310+
// Finish UI initialization
311+
ViewCommandHandlers.restoreFontSize();
312+
ProjectManager.getStartupProjectPath().then((initialProjectPath)=>{
313+
ProjectManager.openProject(initialProjectPath).always(function () {
314+
_initTest();
315+
316+
// If this is the first launch, and we have an index.html file in the project folder (which should be
317+
// the samples folder on first launch), open it automatically. (We explicitly check for the
318+
// samples folder in case this is the first time we're launching Brackets after upgrading from
319+
// an old version that might not have set the "afterFirstLaunch" pref.)
320+
const deferred = new $.Deferred();
321+
322+
if (!params.get("skipSampleProjectLoad") && !PreferencesManager.getViewState("afterFirstLaunch")) {
323+
PreferencesManager.setViewState("afterFirstLaunch", "true");
324+
if (ProjectManager.isWelcomeProjectPath(initialProjectPath)) {
325+
FileSystem.resolve(initialProjectPath + "index.html", function (err, file) {
326+
if (!err) {
327+
const promise = CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: file.fullPath });
328+
promise.then(deferred.resolve, deferred.reject);
329+
} else {
330+
deferred.reject();
331+
}
332+
});
333+
} else {
334+
deferred.resolve();
335+
}
336+
} else {
337+
deferred.resolve();
338+
}
339+
340+
deferred.always(function () {
341+
extensionLoaderPromise.always(function () {
342+
// Signal that extensions are loaded
343+
AppInit._dispatchReady(AppInit.EXTENSIONS_LOADED);
344+
// Signal that Brackets is loaded
345+
AppInit._dispatchReady(AppInit.APP_READY);
346+
_removePhoenixLoadingOverlay();
347+
348+
PerfUtils.addMeasurement("Application Startup");
349+
350+
if (PreferencesManager._isUserScopeCorrupt()) {
351+
const userPrefFullPath = PreferencesManager.getUserPrefFile();
352+
// user scope can get corrupt only if the file exists, is readable,
353+
// but malformed. no need to check for its existance.
354+
const info = MainViewManager.findInAllWorkingSets(userPrefFullPath);
355+
let paneId;
356+
if (info.length) {
357+
paneId = info[0].paneId;
358+
}
359+
FileViewController.openFileAndAddToWorkingSet(userPrefFullPath, paneId)
360+
.done(function () {
361+
Dialogs.showModalDialog(
362+
DefaultDialogs.DIALOG_ID_ERROR,
363+
Strings.ERROR_PREFS_CORRUPT_TITLE,
364+
Strings.ERROR_PREFS_CORRUPT
365+
).done(function () {
366+
// give the focus back to the editor with the pref file
367+
MainViewManager.focusActivePane();
368+
});
369+
});
370+
}
371+
});
372+
});
373+
374+
// See if any startup files were passed to the application
375+
if (brackets.app.getPendingFilesToOpen) {
376+
brackets.app.getPendingFilesToOpen(function (err, paths) {
377+
DragAndDrop.openDroppedFiles(paths);
378+
});
379+
}
380+
});
381+
});
382+
}
383+
304384
/**
305385
* Setup Brackets
306386
*/
@@ -324,83 +404,11 @@ define(function (require, exports, module) {
324404

325405
// Load default languages and preferences
326406
Async.waitForAll([LanguageManager.ready, PreferencesManager.ready]).always(function () {
327-
// Load all extensions. This promise will complete even if one or more
328-
// extensions fail to load.
329-
const extensionPathOverride = params.get("extensions"); // used by unit tests
330-
const extensionLoaderPromise = ExtensionLoader.init(extensionPathOverride ? extensionPathOverride.split(",") : null);
331-
332-
// Finish UI initialization
333-
ViewCommandHandlers.restoreFontSize();
334-
ProjectManager.getStartupProjectPath().then((initialProjectPath)=>{
335-
ProjectManager.openProject(initialProjectPath).always(function () {
336-
_initTest();
337-
338-
// If this is the first launch, and we have an index.html file in the project folder (which should be
339-
// the samples folder on first launch), open it automatically. (We explicitly check for the
340-
// samples folder in case this is the first time we're launching Brackets after upgrading from
341-
// an old version that might not have set the "afterFirstLaunch" pref.)
342-
const deferred = new $.Deferred();
343-
344-
if (!params.get("skipSampleProjectLoad") && !PreferencesManager.getViewState("afterFirstLaunch")) {
345-
PreferencesManager.setViewState("afterFirstLaunch", "true");
346-
if (ProjectManager.isWelcomeProjectPath(initialProjectPath)) {
347-
FileSystem.resolve(initialProjectPath + "index.html", function (err, file) {
348-
if (!err) {
349-
const promise = CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: file.fullPath });
350-
promise.then(deferred.resolve, deferred.reject);
351-
} else {
352-
deferred.reject();
353-
}
354-
});
355-
} else {
356-
deferred.resolve();
357-
}
358-
} else {
359-
deferred.resolve();
360-
}
361-
362-
deferred.always(function () {
363-
extensionLoaderPromise.always(function () {
364-
// Signal that extensions are loaded
365-
AppInit._dispatchReady(AppInit.EXTENSIONS_LOADED);
366-
// Signal that Brackets is loaded
367-
AppInit._dispatchReady(AppInit.APP_READY);
368-
_removePhoenixLoadingOverlay();
369-
370-
PerfUtils.addMeasurement("Application Startup");
371-
372-
if (PreferencesManager._isUserScopeCorrupt()) {
373-
const userPrefFullPath = PreferencesManager.getUserPrefFile();
374-
// user scope can get corrupt only if the file exists, is readable,
375-
// but malformed. no need to check for its existance.
376-
const info = MainViewManager.findInAllWorkingSets(userPrefFullPath);
377-
let paneId;
378-
if (info.length) {
379-
paneId = info[0].paneId;
380-
}
381-
FileViewController.openFileAndAddToWorkingSet(userPrefFullPath, paneId)
382-
.done(function () {
383-
Dialogs.showModalDialog(
384-
DefaultDialogs.DIALOG_ID_ERROR,
385-
Strings.ERROR_PREFS_CORRUPT_TITLE,
386-
Strings.ERROR_PREFS_CORRUPT
387-
).done(function () {
388-
// give the focus back to the editor with the pref file
389-
MainViewManager.focusActivePane();
390-
});
391-
});
392-
}
393-
});
394-
});
395-
396-
// See if any startup files were passed to the application
397-
if (brackets.app.getPendingFilesToOpen) {
398-
brackets.app.getPendingFilesToOpen(function (err, paths) {
399-
DragAndDrop.openDroppedFiles(paths);
400-
});
401-
}
402-
});
403-
});
407+
if(window._phoenixfsAppDirsCreatePromise){
408+
window._phoenixfsAppDirsCreatePromise.finally(_startupBrackets);
409+
} else {
410+
_startupBrackets();
411+
}
404412
});
405413
}
406414

0 commit comments

Comments
 (0)