This repository was archived by the owner on Jan 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
52 lines (45 loc) · 1.45 KB
/
main.js
File metadata and controls
52 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*!
* Brackets Git Extension
*
* @author Martin Zagora
* @license http://opensource.org/licenses/MIT
*/
define(function (require, exports, module) {
// Brackets modules
const _ = brackets.getModule("thirdparty/lodash"),
AppInit = brackets.getModule("utils/AppInit"),
ExtensionUtils = brackets.getModule("utils/ExtensionUtils");
// Local modules
require("src/SettingsDialog");
const EventEmitter = require("src/EventEmitter"),
Events = require("src/Events"),
Main = require("src/Main"),
Preferences = require("src/Preferences"),
BracketsEvents = require("src/BracketsEvents");
// Load extension modules that are not included by core
var modules = [
"src/GutterManager",
"src/History",
"src/NoRepo",
"src/ProjectTreeMarks",
"src/Remotes"
];
require(modules);
// Load CSS
ExtensionUtils.loadStyleSheet(module, "styles/brackets-git.less");
ExtensionUtils.loadStyleSheet(module, "styles/fonts/octicon.less");
AppInit.appReady(function () {
Main.init().then((enabled)=>{
if(!enabled) {
BracketsEvents.disableAll();
}
});
});
// export API's for other extensions
if (typeof window === "object") {
window.phoenixGitEvents = {
EventEmitter: EventEmitter,
Events: Events
};
}
});